cstdint_typedefs.pass.cpp revision 770d1c4ea75402457c5ed3895b5ec044defce01c
1770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant//===----------------------------------------------------------------------===//
2770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant//
3770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant//                     The LLVM Compiler Infrastructure
4770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant//
5770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant// This file is dual licensed under the MIT and the University of Illinois Open
6770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant// Source Licenses. See LICENSE.TXT for details.
7770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant//
8770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant//===----------------------------------------------------------------------===//
9770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant
10770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant// <atomic>
11770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant
12770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant// typedef atomic<int_least8_t>   atomic_int_least8_t;
13770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant// typedef atomic<uint_least8_t>  atomic_uint_least8_t;
14770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant// typedef atomic<int_least16_t>  atomic_int_least16_t;
15770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant// typedef atomic<uint_least16_t> atomic_uint_least16_t;
16770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant// typedef atomic<int_least32_t>  atomic_int_least32_t;
17770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant// typedef atomic<uint_least32_t> atomic_uint_least32_t;
18770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant// typedef atomic<int_least64_t>  atomic_int_least64_t;
19770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant// typedef atomic<uint_least64_t> atomic_uint_least64_t;
20770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant//
21770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant// typedef atomic<int_fast8_t>   atomic_int_fast8_t;
22770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant// typedef atomic<uint_fast8_t>  atomic_uint_fast8_t;
23770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant// typedef atomic<int_fast16_t>  atomic_int_fast16_t;
24770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant// typedef atomic<uint_fast16_t> atomic_uint_fast16_t;
25770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant// typedef atomic<int_fast32_t>  atomic_int_fast32_t;
26770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant// typedef atomic<uint_fast32_t> atomic_uint_fast32_t;
27770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant// typedef atomic<int_fast64_t>  atomic_int_fast64_t;
28770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant// typedef atomic<uint_fast64_t> atomic_uint_fast64_t;
29770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant//
30770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant// typedef atomic<intptr_t>  atomic_intptr_t;
31770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant// typedef atomic<uintptr_t> atomic_uintptr_t;
32770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant// typedef atomic<size_t>    atomic_size_t;
33770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant// typedef atomic<ptrdiff_t> atomic_ptrdiff_t;
34770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant// typedef atomic<intmax_t>  atomic_intmax_t;
35770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant// typedef atomic<uintmax_t> atomic_uintmax_t;
36770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant
37770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant#include <atomic>
38770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant#include <type_traits>
39770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant
40770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnantint main()
41770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant{
42770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant    static_assert((std::is_same<std::atomic<  std::int_least8_t>,   std::atomic_int_least8_t>::value), "");
43770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant    static_assert((std::is_same<std::atomic< std::uint_least8_t>,  std::atomic_uint_least8_t>::value), "");
44770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant    static_assert((std::is_same<std::atomic< std::int_least16_t>,  std::atomic_int_least16_t>::value), "");
45770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant    static_assert((std::is_same<std::atomic<std::uint_least16_t>, std::atomic_uint_least16_t>::value), "");
46770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant    static_assert((std::is_same<std::atomic< std::int_least32_t>,  std::atomic_int_least32_t>::value), "");
47770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant    static_assert((std::is_same<std::atomic<std::uint_least32_t>, std::atomic_uint_least32_t>::value), "");
48770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant    static_assert((std::is_same<std::atomic< std::int_least64_t>,  std::atomic_int_least64_t>::value), "");
49770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant    static_assert((std::is_same<std::atomic<std::uint_least64_t>, std::atomic_uint_least64_t>::value), "");
50770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant
51770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant    static_assert((std::is_same<std::atomic<  std::int_fast8_t>,   std::atomic_int_fast8_t>::value), "");
52770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant    static_assert((std::is_same<std::atomic< std::uint_fast8_t>,  std::atomic_uint_fast8_t>::value), "");
53770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant    static_assert((std::is_same<std::atomic< std::int_fast16_t>,  std::atomic_int_fast16_t>::value), "");
54770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant    static_assert((std::is_same<std::atomic<std::uint_fast16_t>, std::atomic_uint_fast16_t>::value), "");
55770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant    static_assert((std::is_same<std::atomic< std::int_fast32_t>,  std::atomic_int_fast32_t>::value), "");
56770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant    static_assert((std::is_same<std::atomic<std::uint_fast32_t>, std::atomic_uint_fast32_t>::value), "");
57770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant    static_assert((std::is_same<std::atomic< std::int_fast64_t>,  std::atomic_int_fast64_t>::value), "");
58770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant    static_assert((std::is_same<std::atomic<std::uint_fast64_t>, std::atomic_uint_fast64_t>::value), "");
59770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant
60770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant    static_assert((std::is_same<std::atomic< std::intptr_t>,  std::atomic_intptr_t>::value), "");
61770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant    static_assert((std::is_same<std::atomic<std::uintptr_t>, std::atomic_uintptr_t>::value), "");
62770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant    static_assert((std::is_same<std::atomic<   std::size_t>,    std::atomic_size_t>::value), "");
63770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant    static_assert((std::is_same<std::atomic<std::ptrdiff_t>, std::atomic_ptrdiff_t>::value), "");
64770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant    static_assert((std::is_same<std::atomic< std::intmax_t>,  std::atomic_intmax_t>::value), "");
65770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant    static_assert((std::is_same<std::atomic<std::uintmax_t>, std::atomic_uintmax_t>::value), "");
66770d1c4ea75402457c5ed3895b5ec044defce01cHoward Hinnant}
67