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 // This test ensures that passing `-fexperimental-library` results in experimental 10 // library features being enabled. 11 12 // GCC does not support the -fexperimental-library flag 13 // UNSUPPORTED: gcc 14 15 // ADDITIONAL_COMPILE_FLAGS: -fexperimental-library 16 17 #include <version> 18 19 #ifdef _LIBCPP_HAS_NO_INCOMPLETE_PSTL 20 # error "-fexperimental-library should enable the PSTL" 21 #endif 22 23 #ifdef _LIBCPP_HAS_NO_EXPERIMENTAL_STOP_TOKEN 24 # error "-fexperimental-library should enable the stop_token" 25 #endif 26 27 #ifdef _LIBCPP_HAS_NO_INCOMPLETE_TZDB 28 # error "-fexperimental-library should enable the chrono TZDB" 29 #endif 30 31 #ifdef _LIBCPP_HAS_NO_EXPERIMENTAL_SYNCSTREAM 32 # error "-fexperimental-library should enable the syncstream header" 33 #endif 34