| 1 | // -*- C++ -*- |
| 2 | //===----------------------------------------------------------------------===// |
| 3 | // |
| 4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 5 | // See https://llvm.org/LICENSE.txt for license information. |
| 6 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
| 10 | #ifndef _LIBCPP___CONFIGURATION_LANGUAGE_H |
| 11 | #define _LIBCPP___CONFIGURATION_LANGUAGE_H |
| 12 | |
| 13 | #include <__config_site> |
| 14 | |
| 15 | #ifndef _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER |
| 16 | # pragma GCC system_header |
| 17 | #endif |
| 18 | |
| 19 | // NOLINTBEGIN(libcpp-cpp-version-check) |
| 20 | #ifdef __cplusplus |
| 21 | # if __cplusplus <= 201103L |
| 22 | # define _LIBCPP_STD_VER 11 |
| 23 | # elif __cplusplus <= 201402L |
| 24 | # define _LIBCPP_STD_VER 14 |
| 25 | # elif __cplusplus <= 201703L |
| 26 | # define _LIBCPP_STD_VER 17 |
| 27 | # elif __cplusplus <= 202002L |
| 28 | # define _LIBCPP_STD_VER 20 |
| 29 | # elif __cplusplus <= 202302L |
| 30 | # define _LIBCPP_STD_VER 23 |
| 31 | # else |
| 32 | // Expected release year of the next C++ standard |
| 33 | # define _LIBCPP_STD_VER 26 |
| 34 | # endif |
| 35 | #endif // __cplusplus |
| 36 | // NOLINTEND(libcpp-cpp-version-check) |
| 37 | |
| 38 | #if defined(__cpp_rtti) && __cpp_rtti >= 199711L |
| 39 | # define _LIBCPP_HAS_RTTI 1 |
| 40 | #else |
| 41 | # define _LIBCPP_HAS_RTTI 0 |
| 42 | #endif |
| 43 | |
| 44 | #if defined(__cpp_exceptions) && __cpp_exceptions >= 199711L |
| 45 | # define _LIBCPP_HAS_EXCEPTIONS 1 |
| 46 | #else |
| 47 | # define _LIBCPP_HAS_EXCEPTIONS 0 |
| 48 | #endif |
| 49 | |
| 50 | #endif // _LIBCPP___CONFIGURATION_LANGUAGE_H |
| 51 | |