<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.gmail-m4837989082579054605m3423585960860593753gmail-m3475481270181278667apple-converted-space
        {mso-style-name:gmail-m_4837989082579054605m_3423585960860593753gmail-m_3475481270181278667apple-converted-space;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">For <atomic>, I can imagine a world where a C++03 atomic is conservatively backed by the old __sync_* builtins.  I don’t recall if libc++ atomic is setup in such a way to be able to take advantage of the __sync_* builtins when the __atomic_*
 builtins and _Atomic keywords aren’t present.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> libcxx-dev <libcxx-dev-bounces@lists.llvm.org> <b>
On Behalf Of </b>James Y Knight via libcxx-dev<br>
<b>Sent:</b> Monday, February 11, 2019 2:48 PM<br>
<b>To:</b> JF Bastien <jfbastien@apple.com><br>
<b>Cc:</b> libcxx-dev@lists.llvm.org<br>
<b>Subject:</b> [EXTERNAL] Re: [libcxx-dev] What C++03 support should <atomic> have?<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal">IMO, Libc++ in C++03 is pretty weird in general -- it's odd that it tries to provide c++11 stdlib features in c++98/03 modes. That's certainly been the intended design from the beginning, but I'm not sure how useful it actually is or ever
 has been. I've personally found it both surprising and annoying, back when I actually used to care about pre-c++11 at all. :)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<p class="MsoNormal">For example, a unique_ptr class is provided even pre-c++11. But, as soon as you try to do just about anything with it, it becomes clear that it doesn't (can't!) actually work as it should.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Or, std::promise and std::future are provided, but without move constructors, can you actually use it? Is there really even a point?<o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Wed, Feb 6, 2019 at 2:21 PM JF Bastien via libcxx-dev <<a href="mailto:libcxx-dev@lists.llvm.org" target="_blank">libcxx-dev@lists.llvm.org</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<p class="MsoNormal">Doing atomics before 11 was pretty wild… So I understand that people using an old C++ want some nice atomics. At the same time… They really should update to C++11 or later.<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">What does libc++ try to do with new library features on old languages? Seems easy enough so support most of say optional or variant (without CTAD) before C++17. Is this done consistently? And how far back, do we even try to support C++98?<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">It seems like we can be nice where it’s easy, but at some point in time are we just supporting stuff nobody cares about?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal">On Feb 5, 2019, at 9:33 PM, Olivier Giroux via libcxx-dev <<a href="mailto:libcxx-dev@lists.llvm.org" target="_blank">libcxx-dev@lists.llvm.org</a>> wrote:<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<div>
<p class="MsoNormal">Sorry, that quote is from my patch, but there’s identical code elsewhere in the file. I swear!<span style="font-size:12.0pt"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"> <span style="font-size:12.0pt"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal">Olivier<span style="font-size:12.0pt"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"> <span style="font-size:12.0pt"><o:p></o:p></span></p>
</div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<div>
<p class="MsoNormal"><b><span style="font-size:12.0pt">From:<span class="gmail-m4837989082579054605m3423585960860593753gmail-m3475481270181278667apple-converted-space"> </span></span></b><span style="font-size:12.0pt">libcxx-dev <<a href="mailto:libcxx-dev-bounces@lists.llvm.org" target="_blank">libcxx-dev-bounces@lists.llvm.org</a>>
 on behalf of Olivier Giroux via libcxx-dev <<a href="mailto:libcxx-dev@lists.llvm.org" target="_blank">libcxx-dev@lists.llvm.org</a>><br>
<b>Reply-To:<span class="gmail-m4837989082579054605m3423585960860593753gmail-m3475481270181278667apple-converted-space"> </span></b>Olivier Giroux <<a href="mailto:OGiroux@nvidia.com" target="_blank">OGiroux@nvidia.com</a>><br>
<b>Date:<span class="gmail-m4837989082579054605m3423585960860593753gmail-m3475481270181278667apple-converted-space"> </span></b>Tuesday, February 5, 2019 at 9:33 PM<br>
<b>To:<span class="gmail-m4837989082579054605m3423585960860593753gmail-m3475481270181278667apple-converted-space"> </span></b>"<a href="mailto:libcxx-dev@lists.llvm.org" target="_blank">libcxx-dev@lists.llvm.org</a>" <<a href="mailto:libcxx-dev@lists.llvm.org" target="_blank">libcxx-dev@lists.llvm.org</a>><br>
<b>Subject:<span class="gmail-m4837989082579054605m3423585960860593753gmail-m3475481270181278667apple-converted-space"> </span></b>[libcxx-dev] What C++03 support should <atomic> have?<o:p></o:p></span></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> <span style="font-size:12.0pt"><o:p></o:p></span></p>
</div>
</div>
<div>
<p class="MsoNormal">There is a little bit of code in this file that suggests it once worked in C++03.<span style="font-size:12.0pt"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"> <span style="font-size:12.0pt"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal">Like so:<span style="font-size:12.0pt"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="line-height:13.5pt;background:#1E1E1E"><span style="font-size:10.0pt;font-family:Consolas;color:#C586C0">#ifndef</span><span class="gmail-m4837989082579054605m3423585960860593753gmail-m3475481270181278667apple-converted-space"><span style="font-size:10.0pt;font-family:Consolas;color:#569CD6"> </span></span><span style="font-size:10.0pt;font-family:Consolas;color:#DCDCAA">_LIBCPP_CXX03_LANG</span><span style="font-size:12.0pt"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="line-height:13.5pt;background:#1E1E1E"><span style="font-size:10.0pt;font-family:Consolas;color:#D4D4D4">   <span class="gmail-m4837989082579054605m3423585960860593753gmail-m3475481270181278667apple-converted-space"> </span></span><span style="font-size:10.0pt;font-family:Consolas;color:#DCDCAA">__cxx_atomic_type</span><span style="font-size:10.0pt;font-family:Consolas;color:#D4D4D4">()
 _NOEXCEPT =<span class="gmail-m4837989082579054605m3423585960860593753gmail-m3475481270181278667apple-converted-space"> </span></span><span style="font-size:10.0pt;font-family:Consolas;color:#C586C0">default</span><span style="font-size:10.0pt;font-family:Consolas;color:#D4D4D4">;</span><span style="font-size:12.0pt"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="line-height:13.5pt;background:#1E1E1E"><span style="font-size:10.0pt;font-family:Consolas;color:#C586C0">#else</span><span style="font-size:12.0pt"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="line-height:13.5pt;background:#1E1E1E"><span style="font-size:10.0pt;font-family:Consolas;color:#D4D4D4">   <span class="gmail-m4837989082579054605m3423585960860593753gmail-m3475481270181278667apple-converted-space"> </span></span><span style="font-size:10.0pt;font-family:Consolas;color:#DCDCAA">__cxx_atomic_type</span><span style="font-size:10.0pt;font-family:Consolas;color:#D4D4D4">()
 _NOEXCEPT :<span class="gmail-m4837989082579054605m3423585960860593753gmail-m3475481270181278667apple-converted-space"> </span></span><span style="font-size:10.0pt;font-family:Consolas;color:#DCDCAA">__a_value</span><span style="font-size:10.0pt;font-family:Consolas;color:#D4D4D4">()
 {}</span><span style="font-size:12.0pt"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="line-height:13.5pt;background:#1E1E1E"><span style="font-size:10.0pt;font-family:Consolas;color:#C586C0">#endif</span><span class="gmail-m4837989082579054605m3423585960860593753gmail-m3475481270181278667apple-converted-space"><span style="font-size:10.0pt;font-family:Consolas;color:#D4D4D4"> </span></span><span style="font-size:10.0pt;font-family:Consolas;color:#6A9955">//
 _LIBCPP_CXX03_LANG</span><span style="font-size:12.0pt"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"> <span style="font-size:12.0pt"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal">Is that an actual design goal? It looks like it’s broken right now.<span style="font-size:12.0pt"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"> <span style="font-size:12.0pt"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal">Do we maintain this, or do we bump the assumed default to C++11?<span style="font-size:12.0pt"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"> <span style="font-size:12.0pt"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal">Thanks for your guidance,<span style="font-size:12.0pt"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"> <span style="font-size:12.0pt"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal">Olivier<span style="font-size:12.0pt"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"> <span style="font-size:12.0pt"><o:p></o:p></span></p>
</div>
<div>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="1" width="100%" align="center">
</div>
</div>
<div>
<div>
<p class="MsoNormal">This email message is for the sole use of the intended recipient(s) and may contain confidential information.  Any unauthorized review, use, disclosure or distribution is prohibited.  If you are not the intended recipient, please contact
 the sender by reply email and destroy all copies of the original message.<span style="font-size:12.0pt"><o:p></o:p></span></p>
</div>
</div>
<div>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="1" width="100%" align="center">
</div>
</div>
</div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Helvetica",sans-serif">_______________________________________________<br>
libcxx-dev mailing list<br>
<a href="mailto:libcxx-dev@lists.llvm.org" target="_blank">libcxx-dev@lists.llvm.org</a><br>
<a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.llvm.org_cgi-2Dbin_mailman_listinfo_libcxx-2Ddev&d=DwMFaQ&c=I_0YwoKy7z5LMTVdyO6YCiE2uzI1jjZZuIPelcSjixA&r=y8mub81SfUi-UCZRX0Vl1g&m=8MXCBvaFaYmqPvnvskMFFirEWeEho77oT9SGe-4z7Gg&s=du-qoc0GEQOP9j3X8iFS-EhWaeE_bbFSXxajUeiYiYY&e=" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/libcxx-dev</a></span><o:p></o:p></p>
</div>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
<p class="MsoNormal">_______________________________________________<br>
libcxx-dev mailing list<br>
<a href="mailto:libcxx-dev@lists.llvm.org" target="_blank">libcxx-dev@lists.llvm.org</a><br>
<a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.llvm.org_cgi-2Dbin_mailman_listinfo_libcxx-2Ddev&d=DwMFaQ&c=I_0YwoKy7z5LMTVdyO6YCiE2uzI1jjZZuIPelcSjixA&r=y8mub81SfUi-UCZRX0Vl1g&m=8MXCBvaFaYmqPvnvskMFFirEWeEho77oT9SGe-4z7Gg&s=du-qoc0GEQOP9j3X8iFS-EhWaeE_bbFSXxajUeiYiYY&e=" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/libcxx-dev</a><o:p></o:p></p>
</blockquote>
</div>
</div>
</div>
</body>
</html>