<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">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.<div class=""><br class=""></div><div class="">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?<div class=""><br class=""></div><div class="">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?</div><div class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Feb 5, 2019, at 9:33 PM, Olivier Giroux via libcxx-dev <<a href="mailto:libcxx-dev@lists.llvm.org" class="">libcxx-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 11pt;" class="">Sorry, that quote is from my patch, but there’s identical code elsewhere in the file. I swear!<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 11pt;" class=""><o:p class=""> </o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 11pt;" class="">Olivier<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 11pt;" class=""><o:p class=""> </o:p></span></div><div style="border-style: solid none none; border-top-width: 1pt; border-top-color: rgb(181, 196, 223); padding: 3pt 0in 0in;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;" class=""><b class=""><span style="" class="">From:<span class="Apple-converted-space"> </span></span></b><span style="" class="">libcxx-dev <<a href="mailto:libcxx-dev-bounces@lists.llvm.org" class="">libcxx-dev-bounces@lists.llvm.org</a>> on behalf of Olivier Giroux via libcxx-dev <<a href="mailto:libcxx-dev@lists.llvm.org" class="">libcxx-dev@lists.llvm.org</a>><br class=""><b class="">Reply-To:<span class="Apple-converted-space"> </span></b>Olivier Giroux <<a href="mailto:OGiroux@nvidia.com" class="">OGiroux@nvidia.com</a>><br class=""><b class="">Date:<span class="Apple-converted-space"> </span></b>Tuesday, February 5, 2019 at 9:33 PM<br class=""><b class="">To:<span class="Apple-converted-space"> </span></b>"<a href="mailto:libcxx-dev@lists.llvm.org" class="">libcxx-dev@lists.llvm.org</a>" <<a href="mailto:libcxx-dev@lists.llvm.org" class="">libcxx-dev@lists.llvm.org</a>><br class=""><b class="">Subject:<span class="Apple-converted-space"> </span></b>[libcxx-dev] What C++03 support should <atomic> have?<o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 11pt;" class=""><o:p class=""> </o:p></span></div></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 11pt;" class="">There is a little bit of code in this file that suggests it once worked in C++03.</span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 11pt;" class=""> </span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 11pt;" class="">Like so:</span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif; line-height: 13.5pt; background-color: rgb(30, 30, 30);" class=""><span style="font-size: 10pt; font-family: Consolas; color: rgb(197, 134, 192);" class="">#ifndef</span><span style="font-size: 10pt; font-family: Consolas; color: rgb(86, 156, 214);" class=""><span class="Apple-converted-space"> </span></span><span style="font-size: 10pt; font-family: Consolas; color: rgb(220, 220, 170);" class="">_LIBCPP_CXX03_LANG</span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif; line-height: 13.5pt; background-color: rgb(30, 30, 30);" class=""><span style="font-size: 10pt; font-family: Consolas; color: rgb(212, 212, 212);" class="">   <span class="Apple-converted-space"> </span></span><span style="font-size: 10pt; font-family: Consolas; color: rgb(220, 220, 170);" class="">__cxx_atomic_type</span><span style="font-size: 10pt; font-family: Consolas; color: rgb(212, 212, 212);" class="">() _NOEXCEPT =<span class="Apple-converted-space"> </span></span><span style="font-size: 10pt; font-family: Consolas; color: rgb(197, 134, 192);" class="">default</span><span style="font-size: 10pt; font-family: Consolas; color: rgb(212, 212, 212);" class="">;</span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif; line-height: 13.5pt; background-color: rgb(30, 30, 30);" class=""><span style="font-size: 10pt; font-family: Consolas; color: rgb(197, 134, 192);" class="">#else</span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif; line-height: 13.5pt; background-color: rgb(30, 30, 30);" class=""><span style="font-size: 10pt; font-family: Consolas; color: rgb(212, 212, 212);" class="">   <span class="Apple-converted-space"> </span></span><span style="font-size: 10pt; font-family: Consolas; color: rgb(220, 220, 170);" class="">__cxx_atomic_type</span><span style="font-size: 10pt; font-family: Consolas; color: rgb(212, 212, 212);" class="">() _NOEXCEPT :<span class="Apple-converted-space"> </span></span><span style="font-size: 10pt; font-family: Consolas; color: rgb(220, 220, 170);" class="">__a_value</span><span style="font-size: 10pt; font-family: Consolas; color: rgb(212, 212, 212);" class="">() {}</span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif; line-height: 13.5pt; background-color: rgb(30, 30, 30);" class=""><span style="font-size: 10pt; font-family: Consolas; color: rgb(197, 134, 192);" class="">#endif</span><span style="font-size: 10pt; font-family: Consolas; color: rgb(212, 212, 212);" class=""><span class="Apple-converted-space"> </span></span><span style="font-size: 10pt; font-family: Consolas; color: rgb(106, 153, 85);" class="">// _LIBCPP_CXX03_LANG</span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 11pt;" class=""> </span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 11pt;" class="">Is that an actual design goal? It looks like it’s broken right now.</span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 11pt;" class=""> </span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 11pt;" class="">Do we maintain this, or do we bump the assumed default to C++11?</span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 11pt;" class=""> </span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 11pt;" class="">Thanks for your guidance,</span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 11pt;" class=""> </span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 11pt;" class="">Olivier</span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 11pt;" class=""> </span><o:p class=""></o:p></div><div class=""><div class="MsoNormal" align="center" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif; text-align: center;"><span style="font-size: 11pt;" class=""><hr size="0" width="100%" align="center" class=""></span></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 11pt;" class="">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.<o:p class=""></o:p></span></div></div><div class=""><div class="MsoNormal" align="center" style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif; text-align: center;"><span style="font-size: 11pt;" class=""><hr size="0" width="100%" align="center" class=""></span></div></div></div><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">_______________________________________________</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">libcxx-dev mailing list</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class=""><a href="mailto:libcxx-dev@lists.llvm.org" class="">libcxx-dev@lists.llvm.org</a></span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class=""><a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/libcxx-dev" class="">https://lists.llvm.org/cgi-bin/mailman/listinfo/libcxx-dev</a></span></div></blockquote></div><br class=""></div></div></body></html>