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: 19.6.2 [stacktrace.syn], 25.7 [iterator.range] Status: New Submitter: Jiang An Opened: 2021-10-23 Last modified: 2022-01-29

Priority: 3

View all other issues in [stacktrace.syn].

View all issues with New status.

Discussion:

Range access function templates (25.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 25.7 [iterator.range] as indicated:

   > -1- In addition to being available via inclusion of the `<iterator>` header, the function templates in 25.7 [iterator.range] are available when any of the following headers are included: `<array>` (24.3.2 [array.syn]), `<deque>` (24.3.3 [deque.syn]), `<forward_list>` (24.3.4 [forward.list.syn]), `<list>` (24.3.5 [list.syn]), `<map>` (24.4.2 [associative.map.syn]), `<regex>` (32.3 [re.syn]), `<set>` (24.4.3 [associative.set.syn]), `<span>` (24.7.2 [span.syn]), `<stacktrace>` (19.6.2 [stacktrace.syn]), `<string>` (23.4.2 [string.syn]), `<string_view>` (23.3.2 [string.view.synop]), `<unordered_map>` (24.5.2 [unord.map.syn]), `<unordered_set>` (24.5.3 [unord.set.syn]), and `<vector>` (24.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 19.6.2 [stacktrace.syn].