1//===----------------------------------------------------------------------===//
2//
3//                     The LLVM Compiler Infrastructure
4//
5// This file is dual licensed under the MIT and the University of Illinois Open
6// Source Licenses. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10// <atomic>
11
12// typedef atomic<char>               atomic_char;
13// typedef atomic<signed char>        atomic_schar;
14// typedef atomic<unsigned char>      atomic_uchar;
15// typedef atomic<short>              atomic_short;
16// typedef atomic<unsigned short>     atomic_ushort;
17// typedef atomic<int>                atomic_int;
18// typedef atomic<unsigned int>       atomic_uint;
19// typedef atomic<long>               atomic_long;
20// typedef atomic<unsigned long>      atomic_ulong;
21// typedef atomic<long long>          atomic_llong;
22// typedef atomic<unsigned long long> atomic_ullong;
23// typedef atomic<char16_t>           atomic_char16_t;
24// typedef atomic<char32_t>           atomic_char32_t;
25// typedef atomic<wchar_t>            atomic_wchar_t;
26
27#include <atomic>
28#include <type_traits>
29
30int main()
31{
32    static_assert((std::is_same<std::atomic<char>, std::atomic_char>::value), "");
33    static_assert((std::is_same<std::atomic<signed char>, std::atomic_schar>::value), "");
34    static_assert((std::is_same<std::atomic<unsigned char>, std::atomic_uchar>::value), "");
35    static_assert((std::is_same<std::atomic<short>, std::atomic_short>::value), "");
36    static_assert((std::is_same<std::atomic<unsigned short>, std::atomic_ushort>::value), "");
37    static_assert((std::is_same<std::atomic<int>, std::atomic_int>::value), "");
38    static_assert((std::is_same<std::atomic<unsigned int>, std::atomic_uint>::value), "");
39    static_assert((std::is_same<std::atomic<long>, std::atomic_long>::value), "");
40    static_assert((std::is_same<std::atomic<unsigned long>, std::atomic_ulong>::value), "");
41    static_assert((std::is_same<std::atomic<long long>, std::atomic_llong>::value), "");
42    static_assert((std::is_same<std::atomic<unsigned long long>, std::atomic_ullong>::value), "");
43    static_assert((std::is_same<std::atomic<wchar_t>, std::atomic_wchar_t>::value), "");
44#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
45    static_assert((std::is_same<std::atomic<char16_t>, std::atomic_char16_t>::value), "");
46    static_assert((std::is_same<std::atomic<char32_t>, std::atomic_char32_t>::value), "");
47#endif  // _LIBCPP_HAS_NO_UNICODE_CHARS
48}
49