<div dir="ltr"><div><br></div><div><div class="m_7716572577798633918gmail-adM" style="font-size:12.8px"><div class="m_7716572577798633918gmail-im"><div></div></div></div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">The initialization might happen at compile time, even in C++11 or C++98. See <a href="http://eel.is/c++draft/basic.start.static#3" target="_blank">http://eel.is/c++draft/bas<wbr>ic.start.static#3</a></blockquote><div><br></div><div>*might happen*. Even worse...</div><div> </div></div><div>I think we're jumping the gun. First, we're the only standard library to not backport these extensions.</div><div>In this sense of strict conformance, we're the odd man out: We're the only one to exhibit the bad behavior.</div><div><br></div>Before we concern ourselves too much with standards conformance, we need to establish that making<div>the suggested changes would actually break reasonable user code. (Which I haven't been able to do in a meaningful way).</div><div><br></div><div>Can somebody provide an example of such code?</div><div><br></div><div>Otherwise, we should do as the Romans do, and change libc++ to do the *right* thing.</div><div><br></div><div>/Eric</div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 12, 2017 at 10:18 AM, Jeff Hammond <span dir="ltr"><<a href="mailto:jeff.science@gmail.com" target="_blank">jeff.science@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br><div class="gmail_quote"><span><div dir="auto">On Thu, Oct 12, 2017 at 7:39 AM Brian Cain via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">> -----Original Message-----<br>
> From: cfe-dev [mailto:<a href="mailto:cfe-dev-bounces@lists.llvm.org" target="_blank">cfe-dev-bounces@lists.<wbr>llvm.org</a>] On Behalf Of Howard<br>
> Hinnant via cfe-dev<br>
...<br>
> Random, untested thought:<br>
><br>
> What if in <__config> every _LIBCPP_CONFIG_MACRO was defined like this:<br>
><br>
> #ifndef _LIBCPP_CONFIG_MACRO<br>
><br>
> // Current configuration goes here<br>
><br>
> #endif<br>
><br>
> And then clients could compile like this if desired:<br>
><br>
> clang++ -D_LIBCPP_CONSTEXPR_AFTER_CXX1<wbr>1=constexpr …<br>
><br>
> libc++ stays conformant, but becomes far more configurable.<br>
<br>
That seems a little awkward. What if we added a "-std=clang++11" mode (like "gnu++11" ) that would specify that definition when stdlib=libc++? If we came up with other good-for-users deviations from the standard, we could enable them in this mode.</blockquote><div dir="auto"><br></div></span><div dir="auto">+1</div><div dir="auto"><br></div><div dir="auto">Please do not deliberately break standard conformance when apparently standard-enforcing flags are used.</div><span class="m_7716572577798633918HOEnZb"><font color="#888888"><div dir="auto"><br></div><div dir="auto">Jeff</div></font></span></div><span class="m_7716572577798633918HOEnZb"><font color="#888888"><div dir="ltr">-- <br></div><div class="m_7716572577798633918m_1054274651117528073gmail_signature" data-smartmail="gmail_signature">Jeff Hammond<br><a href="mailto:jeff.science@gmail.com" target="_blank">jeff.science@gmail.com</a><br><a href="http://jeffhammond.github.io/" target="_blank">http://jeffhammond.github.io/</a></div>
</font></span></blockquote></div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 12, 2017 at 10:18 AM, Jeff Hammond <span dir="ltr"><<a href="mailto:jeff.science@gmail.com" target="_blank">jeff.science@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br><div class="gmail_quote"><span class=""><div dir="auto">On Thu, Oct 12, 2017 at 7:39 AM Brian Cain via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">> -----Original Message-----<br>
> From: cfe-dev [mailto:<a href="mailto:cfe-dev-bounces@lists.llvm.org" target="_blank">cfe-dev-bounces@lists.<wbr>llvm.org</a>] On Behalf Of Howard<br>
> Hinnant via cfe-dev<br>
...<br>
> Random, untested thought:<br>
><br>
> What if in <__config> every _LIBCPP_CONFIG_MACRO was defined like this:<br>
><br>
> #ifndef _LIBCPP_CONFIG_MACRO<br>
><br>
> // Current configuration goes here<br>
><br>
> #endif<br>
><br>
> And then clients could compile like this if desired:<br>
><br>
> clang++ -D_LIBCPP_CONSTEXPR_AFTER_<wbr>CXX11=constexpr …<br>
><br>
> libc++ stays conformant, but becomes far more configurable.<br>
<br>
That seems a little awkward. What if we added a "-std=clang++11" mode (like "gnu++11" ) that would specify that definition when stdlib=libc++? If we came up with other good-for-users deviations from the standard, we could enable them in this mode.</blockquote><div dir="auto"><br></div></span><div dir="auto">+1</div><div dir="auto"><br></div><div dir="auto">Please do not deliberately break standard conformance when apparently standard-enforcing flags are used.</div><span class="HOEnZb"><font color="#888888"><div dir="auto"><br></div><div dir="auto">Jeff</div></font></span></div><span class="HOEnZb"><font color="#888888"><div dir="ltr">-- <br></div><div class="m_3000693715729361987gmail_signature" data-smartmail="gmail_signature">Jeff Hammond<br><a href="mailto:jeff.science@gmail.com" target="_blank">jeff.science@gmail.com</a><br><a href="http://jeffhammond.github.io/" target="_blank">http://jeffhammond.github.io/</a></div>
</font></span></blockquote></div><br></div>