| 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 | // WARNING: This test was generated by generate_feature_test_macro_components.py |
| 10 | // and should not be edited manually. |
| 11 | |
| 12 | // <bitset> |
| 13 | |
| 14 | // Test the feature test macros defined by <bitset> |
| 15 | |
| 16 | // clang-format off |
| 17 | |
| 18 | #include <bitset> |
| 19 | #include "test_macros.h" |
| 20 | |
| 21 | #if TEST_STD_VER < 14 |
| 22 | |
| 23 | # ifdef __cpp_lib_bitset |
| 24 | # error "__cpp_lib_bitset should not be defined before c++26" |
| 25 | # endif |
| 26 | |
| 27 | # ifdef __cpp_lib_constexpr_bitset |
| 28 | # error "__cpp_lib_constexpr_bitset should not be defined before c++23" |
| 29 | # endif |
| 30 | |
| 31 | #elif TEST_STD_VER == 14 |
| 32 | |
| 33 | # ifdef __cpp_lib_bitset |
| 34 | # error "__cpp_lib_bitset should not be defined before c++26" |
| 35 | # endif |
| 36 | |
| 37 | # ifdef __cpp_lib_constexpr_bitset |
| 38 | # error "__cpp_lib_constexpr_bitset should not be defined before c++23" |
| 39 | # endif |
| 40 | |
| 41 | #elif TEST_STD_VER == 17 |
| 42 | |
| 43 | # ifdef __cpp_lib_bitset |
| 44 | # error "__cpp_lib_bitset should not be defined before c++26" |
| 45 | # endif |
| 46 | |
| 47 | # ifdef __cpp_lib_constexpr_bitset |
| 48 | # error "__cpp_lib_constexpr_bitset should not be defined before c++23" |
| 49 | # endif |
| 50 | |
| 51 | #elif TEST_STD_VER == 20 |
| 52 | |
| 53 | # ifdef __cpp_lib_bitset |
| 54 | # error "__cpp_lib_bitset should not be defined before c++26" |
| 55 | # endif |
| 56 | |
| 57 | # ifdef __cpp_lib_constexpr_bitset |
| 58 | # error "__cpp_lib_constexpr_bitset should not be defined before c++23" |
| 59 | # endif |
| 60 | |
| 61 | #elif TEST_STD_VER == 23 |
| 62 | |
| 63 | # ifdef __cpp_lib_bitset |
| 64 | # error "__cpp_lib_bitset should not be defined before c++26" |
| 65 | # endif |
| 66 | |
| 67 | # ifndef __cpp_lib_constexpr_bitset |
| 68 | # error "__cpp_lib_constexpr_bitset should be defined in c++23" |
| 69 | # endif |
| 70 | # if __cpp_lib_constexpr_bitset != 202207L |
| 71 | # error "__cpp_lib_constexpr_bitset should have the value 202207L in c++23" |
| 72 | # endif |
| 73 | |
| 74 | #elif TEST_STD_VER > 23 |
| 75 | |
| 76 | # ifndef __cpp_lib_bitset |
| 77 | # error "__cpp_lib_bitset should be defined in c++26" |
| 78 | # endif |
| 79 | # if __cpp_lib_bitset != 202306L |
| 80 | # error "__cpp_lib_bitset should have the value 202306L in c++26" |
| 81 | # endif |
| 82 | |
| 83 | # ifndef __cpp_lib_constexpr_bitset |
| 84 | # error "__cpp_lib_constexpr_bitset should be defined in c++26" |
| 85 | # endif |
| 86 | # if __cpp_lib_constexpr_bitset != 202207L |
| 87 | # error "__cpp_lib_constexpr_bitset should have the value 202207L in c++26" |
| 88 | # endif |
| 89 | |
| 90 | #endif // TEST_STD_VER > 23 |
| 91 | |
| 92 | // clang-format on |
| 93 | |
| 94 | |