diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2019-07-11 20:43:25 +0100 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2019-07-11 20:43:25 +0100 |
commit | a90fe12c80a13ffed9d5c775703788275d8b7c42 (patch) | |
tree | aa520ab892dcf849531edb655bcff7516e600618 /gcc/cfgexpand.c | |
parent | 4c98bdadcb67e12c63882587d96ab6335711f009 (diff) | |
download | gcc-a90fe12c80a13ffed9d5c775703788275d8b7c42.zip gcc-a90fe12c80a13ffed9d5c775703788275d8b7c42.tar.gz gcc-a90fe12c80a13ffed9d5c775703788275d8b7c42.tar.bz2 |
Define std::atomic_ref and std::atomic<floating-point> for C++20
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.
From-SVN: r273420
Diffstat (limited to 'gcc/cfgexpand.c')
0 files changed, 0 insertions, 0 deletions