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