| 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 | // <flat_map> |
| 13 | |
| 14 | // Test the feature test macros defined by <flat_map> |
| 15 | |
| 16 | // clang-format off |
| 17 | |
| 18 | #include <flat_map> |
| 19 | #include "test_macros.h" |
| 20 | |
| 21 | #if TEST_STD_VER < 14 |
| 22 | |
| 23 | # ifdef __cpp_lib_flat_map |
| 24 | # error "__cpp_lib_flat_map should not be defined before c++23" |
| 25 | # endif |
| 26 | |
| 27 | #elif TEST_STD_VER == 14 |
| 28 | |
| 29 | # ifdef __cpp_lib_flat_map |
| 30 | # error "__cpp_lib_flat_map should not be defined before c++23" |
| 31 | # endif |
| 32 | |
| 33 | #elif TEST_STD_VER == 17 |
| 34 | |
| 35 | # ifdef __cpp_lib_flat_map |
| 36 | # error "__cpp_lib_flat_map should not be defined before c++23" |
| 37 | # endif |
| 38 | |
| 39 | #elif TEST_STD_VER == 20 |
| 40 | |
| 41 | # ifdef __cpp_lib_flat_map |
| 42 | # error "__cpp_lib_flat_map should not be defined before c++23" |
| 43 | # endif |
| 44 | |
| 45 | #elif TEST_STD_VER == 23 |
| 46 | |
| 47 | # ifndef __cpp_lib_flat_map |
| 48 | # error "__cpp_lib_flat_map should be defined in c++23" |
| 49 | # endif |
| 50 | # if __cpp_lib_flat_map != 202207L |
| 51 | # error "__cpp_lib_flat_map should have the value 202207L in c++23" |
| 52 | # endif |
| 53 | |
| 54 | #elif TEST_STD_VER > 23 |
| 55 | |
| 56 | # ifndef __cpp_lib_flat_map |
| 57 | # error "__cpp_lib_flat_map should be defined in c++26" |
| 58 | # endif |
| 59 | # if __cpp_lib_flat_map != 202207L |
| 60 | # error "__cpp_lib_flat_map should have the value 202207L in c++26" |
| 61 | # endif |
| 62 | |
| 63 | #endif // TEST_STD_VER > 23 |
| 64 | |
| 65 | // clang-format on |
| 66 | |
| 67 | |