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_CXX03_LANG
23# endif
24# if __cplusplus <= 201103L
25# define _LIBCPP_STD_VER 11
26# elif __cplusplus <= 201402L
27# define _LIBCPP_STD_VER 14
28# elif __cplusplus <= 201703L
29# define _LIBCPP_STD_VER 17
30# elif __cplusplus <= 202002L
31# define _LIBCPP_STD_VER 20
32# elif __cplusplus <= 202302L
33# define _LIBCPP_STD_VER 23
34# else
35// Expected release year of the next C++ standard
36# define _LIBCPP_STD_VER 26
37# endif
38#endif // __cplusplus
39// NOLINTEND(libcpp-cpp-version-check)
40
41#if defined(__cpp_rtti) && __cpp_rtti >= 199711L
42# define _LIBCPP_HAS_RTTI 1
43#else
44# define _LIBCPP_HAS_RTTI 0
45#endif
46
47#if defined(__cpp_exceptions) && __cpp_exceptions >= 199711L
48# define _LIBCPP_HAS_EXCEPTIONS 1
49#else
50# define _LIBCPP_HAS_EXCEPTIONS 0
51#endif
52
53#if _LIBCPP_STD_VER <= 17 || !defined(__cpp_char8_t)
54# define _LIBCPP_HAS_CHAR8_T 0
55#else
56# define _LIBCPP_HAS_CHAR8_T 1
57#endif
58
59#endif // _LIBCPP___CONFIGURATION_LANGUAGE_H
60