]>
git.ipfire.org Git - thirdparty/gcc.git/blob - libstdc++-v3/testsuite/29_atomics/headers/atomic/types_std_c++20.cc
1 // { dg-options "-std=gnu++2a" }
2 // { dg-do compile { target c++2a } }
3 // { dg-require-cstdint "" }
5 // Copyright (C) 2008-2021 Free Software Foundation, Inc.
7 // This file is part of the GNU ISO C++ Library. This library is free
8 // software; you can redistribute it and/or modify it under the
9 // terms of the GNU General Public License as published by the
10 // Free Software Foundation; either version 3, or (at your option)
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU General Public License for more details.
18 // You should have received a copy of the GNU General Public License along
19 // with this library; see the file COPYING3. If not see
20 // <http://www.gnu.org/licenses/>.
26 using std::memory_order
;
27 // TODO add checks for new enumerators memory_order::relaxed etc.
28 // using std::memory_order::relaxed;
29 // using std::memory_order::consume;
30 // using std::memory_order::acquire;
31 // using std::memory_order::release;
32 // using std::memory_order::acq_rel;
33 // using std::memory_order::seq_cst;
34 using std::memory_order_relaxed
;
35 using std::memory_order_consume
;
36 using std::memory_order_acquire
;
37 using std::memory_order_release
;
38 using std::memory_order_acq_rel
;
39 using std::memory_order_seq_cst
;
41 using std::atomic_flag
;
43 // atomics for builtins types
44 using std::atomic_bool
;
45 using std::atomic_char
;
46 using std::atomic_schar
;
47 using std::atomic_uchar
;
48 using std::atomic_short
;
49 using std::atomic_ushort
;
50 using std::atomic_int
;
51 using std::atomic_uint
;
52 using std::atomic_long
;
53 using std::atomic_ulong
;
54 using std::atomic_llong
;
55 using std::atomic_ullong
;
56 using std::atomic_wchar_t
;
57 #ifdef _GLIBCXX_USE_CHAR8_T
58 using std::atomic_char8_t
;
60 using std::atomic_char16_t
;
61 using std::atomic_char32_t
;
63 // atomics for standard typedefs
64 using std::atomic_int_least8_t
;
65 using std::atomic_uint_least8_t
;
66 using std::atomic_int_least16_t
;
67 using std::atomic_uint_least16_t
;
68 using std::atomic_int_least32_t
;
69 using std::atomic_uint_least32_t
;
70 using std::atomic_int_least64_t
;
71 using std::atomic_uint_least64_t
;
72 using std::atomic_int_fast8_t
;
73 using std::atomic_uint_fast8_t
;
74 using std::atomic_int_fast16_t
;
75 using std::atomic_uint_fast16_t
;
76 using std::atomic_int_fast32_t
;
77 using std::atomic_uint_fast32_t
;
78 using std::atomic_int_fast64_t
;
79 using std::atomic_uint_fast64_t
;
80 using std::atomic_intptr_t
;
81 using std::atomic_uintptr_t
;
82 using std::atomic_size_t
;
83 using std::atomic_ptrdiff_t
;
84 using std::atomic_intmax_t
;
85 using std::atomic_uintmax_t
;
88 using std::atomic_int8_t
;
89 using std::atomic_uint8_t
;
90 using std::atomic_int16_t
;
91 using std::atomic_uint16_t
;
92 using std::atomic_int32_t
;
93 using std::atomic_uint32_t
;
94 using std::atomic_int64_t
;
95 using std::atomic_uint64_t
;