This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of New status.

### 3625. Should `<stacktrace>` provide range access function templates?

Section: 20.21.2 [stacktrace.syn], 23.7 [iterator.range] Status: New Submitter: Jiang An Opened: 2021-10-23 Last modified: 2021-10-24

Priority: 3

View other active issues in [stacktrace.syn].

View all other issues in [stacktrace.syn].

View all issues with New status.

Discussion:

Range access function templates (23.7 [iterator.range]) are available in every standard header for containers. As `std::basic_stacktrace` provides some container-like interfaces (member functions `begin`, `end`, `size`, etc.), should we add these free function templates to `<stacktrace>` for consistency?

[2021-10-24; Daniel comments]

This issue is related to LWG 3624.

[2022-01-29; Reflector poll]

Set priority to 3 after reflector poll.

Proposed resolution:

This wording is relative to N4901.

> [Drafting note: The proposed wording below contains one conditional change, it is therefore depending upon a decision]

1. Modify 23.7 [iterator.range] as indicated:

   > -1- In addition to being available via inclusion of the `<iterator>` header, the function templates in 23.7 [iterator.range] are available when any of the following headers are included: `<array>` (22.3.2 [array.syn]), `<deque>` (22.3.3 [deque.syn]), `<forward_list>` (22.3.4 [forward.list.syn]), `<list>` (22.3.5 [list.syn]), `<map>` (22.4.2 [associative.map.syn]), `<regex>` (30.3 [re.syn]), `<set>` (22.4.3 [associative.set.syn]), `<span>` (22.7.2 [span.syn]), `<stacktrace>` (20.21.2 [stacktrace.syn]), `<string>` (21.3.2 [string.syn]), `<string_view>` (21.4.2 [string.view.synop]), `<unordered_map>` (22.5.2 [unord.map.syn]), `<unordered_set>` (22.5.3 [unord.set.syn]), and `<vector>` (22.3.6 [vector.syn]). […]

2. If we decide that `<initializer_list>` should be included if the header has dependency on `std::initializer_list` (it may be introduce by `std::rbegin`, `std::data`, etc.), `#include <initializer_list>` should also be added to 20.21.2 [stacktrace.syn].