]> git.ipfire.org Git - thirdparty/gcc.git/blob - libstdc++-v3/testsuite/29_atomics/headers/atomic/types_std_c++0x.cc
Update copyright years.
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / 29_atomics / headers / atomic / types_std_c++0x.cc
1 // { dg-do compile { target c++11 } }
2 // { dg-require-cstdint "" }
3
4 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
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
23 void test01()
24 {
25 using std::memory_order;
26 using std::memory_order_relaxed;
27 using std::memory_order_consume;
28 using std::memory_order_acquire;
29 using std::memory_order_release;
30 using std::memory_order_acq_rel;
31 using std::memory_order_seq_cst;
32
33 using std::atomic_flag;
34
35 // atomics for builtins types
36 using std::atomic_bool;
37 using std::atomic_char;
38 using std::atomic_schar;
39 using std::atomic_uchar;
40 using std::atomic_short;
41 using std::atomic_ushort;
42 using std::atomic_int;
43 using std::atomic_uint;
44 using std::atomic_long;
45 using std::atomic_ulong;
46 using std::atomic_llong;
47 using std::atomic_ullong;
48 using std::atomic_wchar_t;
49 #ifdef _GLIBCXX_USE_CHAR8_T
50 using std::atomic_char8_t;
51 #endif
52 using std::atomic_char16_t;
53 using std::atomic_char32_t;
54
55 // atomics for standard typedefs
56 using std::atomic_int_least8_t;
57 using std::atomic_uint_least8_t;
58 using std::atomic_int_least16_t;
59 using std::atomic_uint_least16_t;
60 using std::atomic_int_least32_t;
61 using std::atomic_uint_least32_t;
62 using std::atomic_int_least64_t;
63 using std::atomic_uint_least64_t;
64 using std::atomic_int_fast8_t;
65 using std::atomic_uint_fast8_t;
66 using std::atomic_int_fast16_t;
67 using std::atomic_uint_fast16_t;
68 using std::atomic_int_fast32_t;
69 using std::atomic_uint_fast32_t;
70 using std::atomic_int_fast64_t;
71 using std::atomic_uint_fast64_t;
72 using std::atomic_intptr_t;
73 using std::atomic_uintptr_t;
74 using std::atomic_size_t;
75 using std::atomic_ptrdiff_t;
76 using std::atomic_intmax_t;
77 using std::atomic_uintmax_t;
78
79 // DR 2441
80 using std::atomic_int8_t;
81 using std::atomic_uint8_t;
82 using std::atomic_int16_t;
83 using std::atomic_uint16_t;
84 using std::atomic_int32_t;
85 using std::atomic_uint32_t;
86 using std::atomic_int64_t;
87 using std::atomic_uint64_t;
88 }