filesystem.version.pass.cpp (2209B)
1 //===----------------------------------------------------------------------===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is dual licensed under the MIT and the University of Illinois Open 6 // Source Licenses. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 // 10 // WARNING: This test was generated by generate_feature_test_macro_components.py 11 // and should not be edited manually. 12 13 // <filesystem> 14 15 // Test the feature test macros defined by <filesystem> 16 17 /* Constant Value 18 __cpp_lib_char8_t 201811L [C++2a] 19 __cpp_lib_filesystem 201703L [C++17] 20 */ 21 22 #include <filesystem> 23 #include "test_macros.h" 24 25 #if TEST_STD_VER < 14 26 27 # ifdef __cpp_lib_char8_t 28 # error "__cpp_lib_char8_t should not be defined before c++2a" 29 # endif 30 31 # ifdef __cpp_lib_filesystem 32 # error "__cpp_lib_filesystem should not be defined before c++17" 33 # endif 34 35 #elif TEST_STD_VER == 14 36 37 # ifdef __cpp_lib_char8_t 38 # error "__cpp_lib_char8_t should not be defined before c++2a" 39 # endif 40 41 # ifdef __cpp_lib_filesystem 42 # error "__cpp_lib_filesystem should not be defined before c++17" 43 # endif 44 45 #elif TEST_STD_VER == 17 46 47 # ifdef __cpp_lib_char8_t 48 # error "__cpp_lib_char8_t should not be defined before c++2a" 49 # endif 50 51 # ifndef __cpp_lib_filesystem 52 # error "__cpp_lib_filesystem should be defined in c++17" 53 # endif 54 # if __cpp_lib_filesystem != 201703L 55 # error "__cpp_lib_filesystem should have the value 201703L in c++17" 56 # endif 57 58 #elif TEST_STD_VER > 17 59 60 # if defined(__cpp_char8_t) 61 # ifndef __cpp_lib_char8_t 62 # error "__cpp_lib_char8_t should be defined in c++2a" 63 # endif 64 # if __cpp_lib_char8_t != 201811L 65 # error "__cpp_lib_char8_t should have the value 201811L in c++2a" 66 # endif 67 # else 68 # ifdef __cpp_lib_char8_t 69 # error "__cpp_lib_char8_t should not be defined when defined(__cpp_char8_t) is not defined!" 70 # endif 71 # endif 72 73 # ifndef __cpp_lib_filesystem 74 # error "__cpp_lib_filesystem should be defined in c++2a" 75 # endif 76 # if __cpp_lib_filesystem != 201703L 77 # error "__cpp_lib_filesystem should have the value 201703L in c++2a" 78 # endif 79 80 #endif // TEST_STD_VER > 17 81 82 int main() {}