<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Issue 3625: Should &lt;stacktrace&gt; provide range access function templates?</title>
<meta property="og:title" content="Issue 3625: Should &lt;stacktrace&gt; provide range access function templates?">
<meta property="og:description" content="C++ library issue. Status: New">
<meta property="og:url" content="https://cplusplus.github.io/LWG/issue3625.html">
<meta property="og:type" content="website">
<meta property="og:image" content="http://cplusplus.github.io/LWG/images/cpp_logo.png">
<meta property="og:image:alt" content="C++ logo">
<style>
  p {text-align:justify}
  li {text-align:justify}
  pre code.backtick::before { content: "`" }
  pre code.backtick::after { content: "`" }
  blockquote.note
  {
    background-color:#E0E0E0;
    padding-left: 15px;
    padding-right: 15px;
    padding-top: 1px;
    padding-bottom: 1px;
  }
  ins {background-color:#A0FFA0}
  del {background-color:#FFA0A0}
  table.issues-index { border: 1px solid; border-collapse: collapse; }
  table.issues-index th { text-align: center; padding: 4px; border: 1px solid; }
  table.issues-index td { padding: 4px; border: 1px solid; }
  table.issues-index td:nth-child(1) { text-align: right; }
  table.issues-index td:nth-child(2) { text-align: left; }
  table.issues-index td:nth-child(3) { text-align: left; }
  table.issues-index td:nth-child(4) { text-align: left; }
  table.issues-index td:nth-child(5) { text-align: center; }
  table.issues-index td:nth-child(6) { text-align: center; }
  table.issues-index td:nth-child(7) { text-align: left; }
  table.issues-index td:nth-child(5) span.no-pr { color: red; }
  @media (prefers-color-scheme: dark) {
     html {
        color: #ddd;
        background-color: black;
     }
     ins {
        background-color: #225522
     }
     del {
        background-color: #662222
     }
     a {
        color: #6af
     }
     a:visited {
        color: #6af
     }
     blockquote.note
     {
        background-color: rgba(255, 255, 255, .10)
     }
  }
</style>
</head>
<body>
<hr>
<p><em>This page is a snapshot from the LWG issues list, see the <a href="lwg-active.html">Library Active Issues List</a> for more information and the meaning of <a href="lwg-active.html#New">New</a> status.</em></p>
<h3 id="3625"><a href="lwg-active.html#3625">3625</a>. Should <code>&lt;stacktrace&gt;</code> provide range access function templates?</h3>
<p><b>Section:</b> 19.6.2 <a href="https://wg21.link/stacktrace.syn">[stacktrace.syn]</a>, 24.7 <a href="https://wg21.link/iterator.range">[iterator.range]</a> <b>Status:</b> <a href="lwg-active.html#New">New</a>
 <b>Submitter:</b> Jiang An <b>Opened:</b> 2021-10-23 <b>Last modified:</b> 2022-01-29</p>
<p><b>Priority: </b>3
</p>
<p><b>View all other</b> <a href="lwg-index.html#stacktrace.syn">issues</a> in [stacktrace.syn].</p>
<p><b>View all issues with</b> <a href="lwg-status.html#New">New</a> status.</p>
<p><b>Discussion:</b></p>
<p>
Range access function templates (24.7 <a href="https://wg21.link/iterator.range">[iterator.range]</a>) are available in every standard header 
for containers. As <code>std::basic_stacktrace</code> provides some container-like interfaces (member functions 
<code>begin</code>, <code>end</code>, <code>size</code>, etc.), should we add these free function templates to 
<code>&lt;stacktrace&gt;</code> for consistency?
</p>

<p><i>[2021-10-24; Daniel comments]</i></p>

<p>
This issue is related to LWG <a href="lwg-active.html#3624" title="Inconsistency of &lt;typeinfo&gt;, &lt;initializer_list&gt;, and 
&lt;compare&gt; in the standard library (Status: New)">3624</a><sup><a href="https://cplusplus.github.io/LWG/issue3624" title="Latest snapshot">(i)</a></sup>.
</p>

<p><i>[2022-01-29; Reflector poll]</i></p>

<p>
Set priority to 3 after reflector poll.
</p>



<p id="res-3625"><b>Proposed resolution:</b></p>
<p>
This wording is relative to <a href="https://wg21.link/n4901">N4901</a>.
</p>

<blockquote class="note">
<p>
[<i>Drafting note:</i> The proposed wording below contains one conditional change, it is therefore depending upon
a decision]
</p>
</blockquote>

<ol>
<li><p>Modify 24.7 <a href="https://wg21.link/iterator.range">[iterator.range]</a> as indicated:</p>

<blockquote>
<p>
-1- In addition to being available via inclusion of the <code>&lt;iterator&gt;</code> header, the function templates 
in 24.7 <a href="https://wg21.link/iterator.range">[iterator.range]</a> are available when any of the following headers are included: 
<code>&lt;array&gt;</code> (23.3.2 <a href="https://wg21.link/array.syn">[array.syn]</a>), <code>&lt;deque&gt;</code> (23.3.4 <a href="https://wg21.link/deque.syn">[deque.syn]</a>), 
<code>&lt;forward_list&gt;</code> (23.3.6 <a href="https://wg21.link/forward.list.syn">[forward.list.syn]</a>), <code>&lt;list&gt;</code> (23.3.10 <a href="https://wg21.link/list.syn">[list.syn]</a>), 
<code>&lt;map&gt;</code> (23.4.2 <a href="https://wg21.link/associative.map.syn">[associative.map.syn]</a>), <code>&lt;regex&gt;</code> (28.6.3 <a href="https://wg21.link/re.syn">[re.syn]</a>), 
<code>&lt;set&gt;</code> (23.4.5 <a href="https://wg21.link/associative.set.syn">[associative.set.syn]</a>), <code>&lt;span&gt;</code> (23.7.2.1 <a href="https://wg21.link/span.syn">[span.syn]</a>), 
<ins><code>&lt;stacktrace&gt;</code> (19.6.2 <a href="https://wg21.link/stacktrace.syn">[stacktrace.syn]</a>),</ins> <code>&lt;string&gt;</code> (27.4.2 <a href="https://wg21.link/string.syn">[string.syn]</a>), 
<code>&lt;string_view&gt;</code> (27.3.2 <a href="https://wg21.link/string.view.synop">[string.view.synop]</a>), <code>&lt;unordered_map&gt;</code> (23.5.2 <a href="https://wg21.link/unord.map.syn">[unord.map.syn]</a>), 
<code>&lt;unordered_set&gt;</code> (23.5.5 <a href="https://wg21.link/unord.set.syn">[unord.set.syn]</a>), and <code>&lt;vector&gt;</code> (23.3.12 <a href="https://wg21.link/vector.syn">[vector.syn]</a>).
[&hellip;]
</p>
</blockquote>
</li>
<li><p>If we decide that <code>&lt;initializer_list&gt;</code> should be included if the header has dependency on 
<code>std::initializer_list</code> (it may be introduce by <code>std::rbegin</code>, <code>std::data</code>, etc.), 
<code>#include &lt;initializer_list&gt;</code> should also be added to 19.6.2 <a href="https://wg21.link/stacktrace.syn">[stacktrace.syn]</a>.</p></li>
</ol>





</body>
</html>
