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 | // clang-format off |
13 | |
14 | // UNSUPPORTED: no-localization |
15 | |
16 | // <fstream> |
17 | |
18 | // Test the feature test macros defined by <fstream> |
19 | |
20 | /* Constant Value |
21 | __cpp_lib_fstream_native_handle 202306L [C++26] |
22 | */ |
23 | |
24 | #include <fstream> |
25 | #include "test_macros.h" |
26 | |
27 | #if TEST_STD_VER < 14 |
28 | |
29 | # ifdef __cpp_lib_fstream_native_handle |
30 | # error "__cpp_lib_fstream_native_handle should not be defined before c++26" |
31 | # endif |
32 | |
33 | #elif TEST_STD_VER == 14 |
34 | |
35 | # ifdef __cpp_lib_fstream_native_handle |
36 | # error "__cpp_lib_fstream_native_handle should not be defined before c++26" |
37 | # endif |
38 | |
39 | #elif TEST_STD_VER == 17 |
40 | |
41 | # ifdef __cpp_lib_fstream_native_handle |
42 | # error "__cpp_lib_fstream_native_handle should not be defined before c++26" |
43 | # endif |
44 | |
45 | #elif TEST_STD_VER == 20 |
46 | |
47 | # ifdef __cpp_lib_fstream_native_handle |
48 | # error "__cpp_lib_fstream_native_handle should not be defined before c++26" |
49 | # endif |
50 | |
51 | #elif TEST_STD_VER == 23 |
52 | |
53 | # ifdef __cpp_lib_fstream_native_handle |
54 | # error "__cpp_lib_fstream_native_handle should not be defined before c++26" |
55 | # endif |
56 | |
57 | #elif TEST_STD_VER > 23 |
58 | |
59 | # if !defined(_LIBCPP_VERSION) || (!defined(_LIBCPP_HAS_NO_FILESYSTEM) && !defined(_LIBCPP_HAS_NO_LOCALIZATION)) |
60 | # ifndef __cpp_lib_fstream_native_handle |
61 | # error "__cpp_lib_fstream_native_handle should be defined in c++26" |
62 | # endif |
63 | # if __cpp_lib_fstream_native_handle != 202306L |
64 | # error "__cpp_lib_fstream_native_handle should have the value 202306L in c++26" |
65 | # endif |
66 | # else |
67 | # ifdef __cpp_lib_fstream_native_handle |
68 | # error "__cpp_lib_fstream_native_handle should not be defined when the requirement '!defined(_LIBCPP_VERSION) || (!defined(_LIBCPP_HAS_NO_FILESYSTEM) && !defined(_LIBCPP_HAS_NO_LOCALIZATION))' is not met!" |
69 | # endif |
70 | # endif |
71 | |
72 | #endif // TEST_STD_VER > 23 |
73 | |
74 | |