1 //===----------------------------------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // WARNING: This test was generated by generate_feature_test_macro_components.py
11 // and should not be edited manually.
15 // Test the feature test macros defined by <numeric>
18 __cpp_lib_gcd_lcm 201606L [C++17]
19 __cpp_lib_parallel_algorithm 201603L [C++17]
23 #include "test_macros.h"
27 # ifdef __cpp_lib_gcd_lcm
28 # error "__cpp_lib_gcd_lcm should not be defined before c++17"
31 # ifdef __cpp_lib_parallel_algorithm
32 # error "__cpp_lib_parallel_algorithm should not be defined before c++17"
35 #elif TEST_STD_VER == 14
37 # ifdef __cpp_lib_gcd_lcm
38 # error "__cpp_lib_gcd_lcm should not be defined before c++17"
41 # ifdef __cpp_lib_parallel_algorithm
42 # error "__cpp_lib_parallel_algorithm should not be defined before c++17"
45 #elif TEST_STD_VER == 17
47 # ifndef __cpp_lib_gcd_lcm
48 # error "__cpp_lib_gcd_lcm should be defined in c++17"
50 # if __cpp_lib_gcd_lcm != 201606L
51 # error "__cpp_lib_gcd_lcm should have the value 201606L in c++17"
54 # if !defined(_LIBCPP_VERSION)
55 # ifndef __cpp_lib_parallel_algorithm
56 # error "__cpp_lib_parallel_algorithm should be defined in c++17"
58 # if __cpp_lib_parallel_algorithm != 201603L
59 # error "__cpp_lib_parallel_algorithm should have the value 201603L in c++17"
61 # else // _LIBCPP_VERSION
62 # ifdef __cpp_lib_parallel_algorithm
63 # error "__cpp_lib_parallel_algorithm should not be defined because it is unimplemented in libc++!"
67 #elif TEST_STD_VER > 17
69 # ifndef __cpp_lib_gcd_lcm
70 # error "__cpp_lib_gcd_lcm should be defined in c++2a"
72 # if __cpp_lib_gcd_lcm != 201606L
73 # error "__cpp_lib_gcd_lcm should have the value 201606L in c++2a"
76 # if !defined(_LIBCPP_VERSION)
77 # ifndef __cpp_lib_parallel_algorithm
78 # error "__cpp_lib_parallel_algorithm should be defined in c++2a"
80 # if __cpp_lib_parallel_algorithm != 201603L
81 # error "__cpp_lib_parallel_algorithm should have the value 201603L in c++2a"
83 # else // _LIBCPP_VERSION
84 # ifdef __cpp_lib_parallel_algorithm
85 # error "__cpp_lib_parallel_algorithm should not be defined because it is unimplemented in libc++!"
89 #endif // TEST_STD_VER > 17