On 11/07/19 20:45 +0100, Jonathan Wakely wrote:
This adds the new atomic types from C++2a, as proposed by P0019 and
P0020. To reduce duplication the calls to the compiler's atomic
built-ins are wrapped in new functions in the __atomic_impl namespace.
These functions are currently only used by std::atomic<floating-point>
and std::atomic_ref but could also be used for all other specializations
of std::atomic.
* include/bits/atomic_base.h (__atomic_impl): New namespace for
wrappers around atomic built-ins.
(__atomic_float, __atomic_ref): New class templates for use as base
classes.
* include/std/atomic (atomic<float>, atomic<double>)
(atomic<long double>): New explicit specializations.
(atomic_ref): New class template.
(__cpp_lib_atomic_ref): Define.
* include/std/version (__cpp_lib_atomic_ref): Define.
* testsuite/29_atomics/atomic/60695.cc: Adjust dg-error.
* testsuite/29_atomics/atomic_float/1.cc: New test.
* testsuite/29_atomics/atomic_float/requirements.cc: New test.
* testsuite/29_atomics/atomic_ref/deduction.cc: New test.
* testsuite/29_atomics/atomic_ref/float.cc: New test.
* testsuite/29_atomics/atomic_ref/generic.cc: New test.
* testsuite/29_atomics/atomic_ref/integral.cc: New test.
* testsuite/29_atomics/atomic_ref/pointer.cc: New test.
* testsuite/29_atomics/atomic_ref/requirements.cc: New test.
Here's the doc update for these features. Committed to trunk.
commit 6e6ad5a7338f902cfa1f8296eb11f6e0e6993a92
Author: redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Fri Jul 12 11:43:17 2019 +0000
Update C++2a library status table
* doc/xml/manual/status_cxx2020.xml: Update status for atomic_ref
and floating point atomics.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@273441 138bc75d-0d04-0410-961f-82ee72b054a4
diff --git a/libstdc++-v3/doc/xml/manual/status_cxx2020.xml b/libstdc++-v3/doc/xml/manual/status_cxx2020.xml
index 029c5bc9b8e..3a5de38ad22 100644
--- a/libstdc++-v3/doc/xml/manual/status_cxx2020.xml
+++ b/libstdc++-v3/doc/xml/manual/status_cxx2020.xml
@@ -78,14 +78,13 @@ Feature-testing recommendations for C++</link>.
</row>
<row>
- <?dbhtml bgcolor="#C8B0B0" ?>
<entry> Floating Point Atomic </entry>
<entry>
<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0020r6.html">
P0020R6
</link>
</entry>
- <entry align="center"> </entry>
+ <entry align="center"> 10.1 </entry>
<entry />
</row>
@@ -345,15 +344,14 @@ Feature-testing recommendations for C++</link>.
</row>
<row>
- <?dbhtml bgcolor="#C8B0B0" ?>
<entry> Atomic Ref </entry>
<entry>
<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0019r8.html">
P0019R8
</link>
</entry>
- <entry align="center"> </entry>
- <entry />
+ <entry align="center"> 10.1 </entry>
+ <entry> <code>__cpp_lib_atomic_ref >= 201806L</code> </entry>
</row>
<row>