1 
2 //===----------------------------------------------------------------------===//
3 //
4 //                     The LLVM Compiler Infrastructure
5 //
6 // This file is dual licensed under the MIT and the University of Illinois Open
7 // Source Licenses. See LICENSE.TXT for details.
8 //
9 //===----------------------------------------------------------------------===//
10 //
11 // <filesystem> feature macros
12 
13 /*  Constant                                    Value
14     __cpp_lib_char8_t                           201811L
15     __cpp_lib_filesystem                        201703L
16 
17 */
18 
19 #include <filesystem>
20 #include <cassert>
21 #include "test_macros.h"
22 
main()23 int main()
24 {
25 //  ensure that the macros that are supposed to be defined in <filesystem> are defined.
26 
27 #if TEST_STD_VER > 17 && defined(__cpp_char8_t)
28 # if !defined(__cpp_lib_char8_t)
29   LIBCPP_STATIC_ASSERT(false, "__cpp_lib_char8_t is not defined");
30 # else
31 #  if __cpp_lib_char8_t < 201811L
32 #   error "__cpp_lib_char8_t has an invalid value"
33 #  endif
34 # endif
35 #endif
36 
37 #if TEST_STD_VER > 14
38 # if !defined(__cpp_lib_filesystem)
39 #  error "__cpp_lib_filesystem is not defined"
40 # elif __cpp_lib_filesystem < 201703L
41 #  error "__cpp_lib_filesystem has an invalid value"
42 # endif
43 #endif
44 
45 /*
46 #if !defined(__cpp_lib_fooby)
47 # error "__cpp_lib_fooby is not defined"
48 #elif __cpp_lib_fooby < 201606L
49 # error "__cpp_lib_fooby has an invalid value"
50 #endif
51 */
52 }
53