You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
format string checks in <codeclass="highlight"><c-n>std</c-><c-o>::</c-><c-n>format</c-></code>. Subsequently, <adata-link-type="biblio" href="#biblio-p3391" title="`constexpr std::format`">[P3391]</a> made <codeclass="highlight"><c-n>std</c-><c-o>::</c-><c-n>format</c-></code> usable in constant evaluation. As a result, <codeclass="highlight"><c-n>std</c-><c-o>::</c-><c-n>runtime_format</c-></code> can now be evaluated at compile time, making its name misleading. This paper
2123
2124
proposes renaming <codeclass="highlight"><c-n>std</c-><c-o>::</c-><c-n>runtime_format</c-></code> to <codeclass="highlight"><c-n>std</c-><c-o>::</c-><c-n>dynamic_format</c-></code> to better
2124
2125
reflect its semantics and avoid confusion in <codeclass="highlight"><c-k>constexpr</c-></code>contexts.</p>
<p>The name <codeclass="highlight"><c-n>std</c-><c-o>::</c-><c-n>runtime_format</c-></code> was accurate when introduced in <adata-link-type="biblio" href="#biblio-p2918" title="Runtime format strings II">[P2918]</a>, as
2127
2133
format strings were not usable in constant evaluation. However, with the
2128
2134
adoption of <codeclass="highlight"><c-k>constexpr</c-></code><codeclass="highlight"><c-n>std</c-><c-o>::</c-><c-n>format</c-></code>, the term runtime no longer reliably
<p>This reads naturally and avoids semantic contradiction.</p>
2163
-
<h2class="heading settled" data-level="4" id="impact"><spanclass="secno">4. </span><spanclass="content">Impact on existing code</span><aclass="self-link" href="#impact"></a></h2>
2169
+
<h2class="heading settled" data-level="5" id="impact"><spanclass="secno">5. </span><spanclass="content">Impact on existing code</span><aclass="self-link" href="#impact"></a></h2>
2164
2170
<p>If this is adopted for C++26 there will be no impact on existing code since <codeclass="highlight"><c-n>std</c-><c-o>::</c-><c-n>runtime_format</c-></code> is a C++26 feature.</p>
0 commit comments