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

Section: 19.6.2 [stacktrace.syn], 24.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 (24.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 24.7 [iterator.range] as indicated:

    -1- In addition to being available via inclusion of the <iterator> header, the function templates in 24.7 [iterator.range] are available when any of the following headers are included: <array> (23.3.2 [array.syn]), <deque> (23.3.4 [deque.syn]), <forward_list> (23.3.6 [forward.list.syn]), <list> (23.3.8 [list.syn]), <map> (23.4.2 [associative.map.syn]), <regex> (28.6.3 [re.syn]), <set> (23.4.5 [associative.set.syn]), <span> (23.7.2.1 [span.syn]), <stacktrace> (19.6.2 [stacktrace.syn]), <string> (27.4.2 [string.syn]), <string_view> (27.3.2 [string.view.synop]), <unordered_map> (23.5.2 [unord.map.syn]), <unordered_set> (23.5.5 [unord.set.syn]), and <vector> (23.3.10 [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].