| 1 | //===----------------------------------------------------------------------===// |
| 2 | // |
| 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | // See https://llvm.org/LICENSE.txt for license information. |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
| 9 | // <atomic> |
| 10 | |
| 11 | // typedef atomic<int_least8_t> atomic_int_least8_t; |
| 12 | // typedef atomic<uint_least8_t> atomic_uint_least8_t; |
| 13 | // typedef atomic<int_least16_t> atomic_int_least16_t; |
| 14 | // typedef atomic<uint_least16_t> atomic_uint_least16_t; |
| 15 | // typedef atomic<int_least32_t> atomic_int_least32_t; |
| 16 | // typedef atomic<uint_least32_t> atomic_uint_least32_t; |
| 17 | // typedef atomic<int_least64_t> atomic_int_least64_t; |
| 18 | // typedef atomic<uint_least64_t> atomic_uint_least64_t; |
| 19 | // |
| 20 | // typedef atomic<int_fast8_t> atomic_int_fast8_t; |
| 21 | // typedef atomic<uint_fast8_t> atomic_uint_fast8_t; |
| 22 | // typedef atomic<int_fast16_t> atomic_int_fast16_t; |
| 23 | // typedef atomic<uint_fast16_t> atomic_uint_fast16_t; |
| 24 | // typedef atomic<int_fast32_t> atomic_int_fast32_t; |
| 25 | // typedef atomic<uint_fast32_t> atomic_uint_fast32_t; |
| 26 | // typedef atomic<int_fast64_t> atomic_int_fast64_t; |
| 27 | // typedef atomic<uint_fast64_t> atomic_uint_fast64_t; |
| 28 | // |
| 29 | // typedef atomic<intptr_t> atomic_intptr_t; |
| 30 | // typedef atomic<uintptr_t> atomic_uintptr_t; |
| 31 | // typedef atomic<size_t> atomic_size_t; |
| 32 | // typedef atomic<ptrdiff_t> atomic_ptrdiff_t; |
| 33 | // typedef atomic<intmax_t> atomic_intmax_t; |
| 34 | // typedef atomic<uintmax_t> atomic_uintmax_t; |
| 35 | |
| 36 | #include <atomic> |
| 37 | #include <cstddef> |
| 38 | #include <cstdint> |
| 39 | #include <type_traits> |
| 40 | |
| 41 | #include "test_macros.h" |
| 42 | |
| 43 | int main(int, char**) |
| 44 | { |
| 45 | static_assert((std::is_same<std::atomic< std::int_least8_t>, std::atomic_int_least8_t>::value), "" ); |
| 46 | static_assert((std::is_same<std::atomic< std::uint_least8_t>, std::atomic_uint_least8_t>::value), "" ); |
| 47 | static_assert((std::is_same<std::atomic< std::int_least16_t>, std::atomic_int_least16_t>::value), "" ); |
| 48 | static_assert((std::is_same<std::atomic<std::uint_least16_t>, std::atomic_uint_least16_t>::value), "" ); |
| 49 | static_assert((std::is_same<std::atomic< std::int_least32_t>, std::atomic_int_least32_t>::value), "" ); |
| 50 | static_assert((std::is_same<std::atomic<std::uint_least32_t>, std::atomic_uint_least32_t>::value), "" ); |
| 51 | static_assert((std::is_same<std::atomic< std::int_least64_t>, std::atomic_int_least64_t>::value), "" ); |
| 52 | static_assert((std::is_same<std::atomic<std::uint_least64_t>, std::atomic_uint_least64_t>::value), "" ); |
| 53 | |
| 54 | static_assert((std::is_same<std::atomic< std::int_fast8_t>, std::atomic_int_fast8_t>::value), "" ); |
| 55 | static_assert((std::is_same<std::atomic< std::uint_fast8_t>, std::atomic_uint_fast8_t>::value), "" ); |
| 56 | static_assert((std::is_same<std::atomic< std::int_fast16_t>, std::atomic_int_fast16_t>::value), "" ); |
| 57 | static_assert((std::is_same<std::atomic<std::uint_fast16_t>, std::atomic_uint_fast16_t>::value), "" ); |
| 58 | static_assert((std::is_same<std::atomic< std::int_fast32_t>, std::atomic_int_fast32_t>::value), "" ); |
| 59 | static_assert((std::is_same<std::atomic<std::uint_fast32_t>, std::atomic_uint_fast32_t>::value), "" ); |
| 60 | static_assert((std::is_same<std::atomic< std::int_fast64_t>, std::atomic_int_fast64_t>::value), "" ); |
| 61 | static_assert((std::is_same<std::atomic<std::uint_fast64_t>, std::atomic_uint_fast64_t>::value), "" ); |
| 62 | |
| 63 | static_assert((std::is_same<std::atomic< std::intptr_t>, std::atomic_intptr_t>::value), "" ); |
| 64 | static_assert((std::is_same<std::atomic<std::uintptr_t>, std::atomic_uintptr_t>::value), "" ); |
| 65 | static_assert((std::is_same<std::atomic< std::size_t>, std::atomic_size_t>::value), "" ); |
| 66 | static_assert((std::is_same<std::atomic<std::ptrdiff_t>, std::atomic_ptrdiff_t>::value), "" ); |
| 67 | static_assert((std::is_same<std::atomic< std::intmax_t>, std::atomic_intmax_t>::value), "" ); |
| 68 | static_assert((std::is_same<std::atomic<std::uintmax_t>, std::atomic_uintmax_t>::value), "" ); |
| 69 | |
| 70 | return 0; |
| 71 | } |
| 72 | |