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