OSDN Git Service

2008-04-10 Benjamin Kosnik <bkoz@redhat.com>
[pf3gnuchains/gcc-fork.git] / libstdc++-v3 / testsuite / 29_atomics / headers / cstdatomic / types_std_c++0x.cc
1 // { dg-options "-std=gnu++0x" }
2 // { dg-do compile }
3
4 // Copyright (C) 2008 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 2, 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 COPYING.  If not, write to the Free
19 // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
20 // USA.
21
22 #include <cstdatomic>
23
24 void test01()
25 {
26   using std::memory_order;
27   using std::memory_order_relaxed;
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   using std::atomic_char16_t;
50   using std::atomic_char32_t;
51
52   // atomics for standard typedefs
53   using std::atomic_int_least8_t;
54   using std::atomic_uint_least8_t;
55   using std::atomic_int_least16_t;
56   using std::atomic_uint_least16_t;
57   using std::atomic_int_least32_t;
58   using std::atomic_uint_least32_t;
59   using std::atomic_int_least64_t;
60   using std::atomic_uint_least64_t;
61   using std::atomic_int_fast8_t;
62   using std::atomic_uint_fast8_t;
63   using std::atomic_int_fast16_t;
64   using std::atomic_uint_fast16_t;
65   using std::atomic_int_fast32_t;
66   using std::atomic_uint_fast32_t;
67   using std::atomic_int_fast64_t;
68   using std::atomic_uint_fast64_t;
69   using std::atomic_intptr_t;
70   using std::atomic_uintptr_t;
71   using std::atomic_size_t;
72   using std::atomic_ssize_t;
73   using std::atomic_ptrdiff_t;
74   using std::atomic_intmax_t;
75   using std::atomic_uintmax_t;
76
77   using std::atomic_address;
78
79   &std::atomic_global_fence_compatibility;
80 }