xref: /netbsd-src/external/gpl3/gcc/dist/libstdc++-v3/include/std/version (revision b1e838363e3c6fc78a55519254d99869742dd33c)
1// -*- C++ -*- Libstdc++ version details header.
2
3// Copyright (C) 2018-2022 Free Software Foundation, Inc.
4//
5// This file is part of the GNU ISO C++ Library.  This library is free
6// software; you can redistribute it and/or modify it under the
7// terms of the GNU General Public License as published by the
8// Free Software Foundation; either version 3, or (at your option)
9// any later version.
10
11// This library is distributed in the hope that it will be useful,
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14// GNU General Public License for more details.
15
16// Under Section 7 of GPL version 3, you are granted additional
17// permissions described in the GCC Runtime Library Exception, version
18// 3.1, as published by the Free Software Foundation.
19
20// You should have received a copy of the GNU General Public License and
21// a copy of the GCC Runtime Library Exception along with this program;
22// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
23// <http://www.gnu.org/licenses/>.
24
25/** @file version
26 *  This is a Standard C++ Library file.  You should @c \#include this file
27 *  in your programs, rather than any of the @a *.h implementation files.
28 */
29
30#ifndef _GLIBCXX_VERSION_INCLUDED
31#define _GLIBCXX_VERSION_INCLUDED
32
33#pragma GCC system_header
34
35#include <bits/c++config.h>
36
37// c++03
38#if _GLIBCXX_HOSTED
39# define __cpp_lib_incomplete_container_elements 201505L
40#endif
41
42#if !defined(__STRICT_ANSI__)
43// gnu++03
44# define __cpp_lib_uncaught_exceptions 201411L
45#endif
46
47#if __cplusplus >= 201103L
48// c++11
49#define __cpp_lib_is_null_pointer 201309L
50#define __cpp_lib_result_of_sfinae 201210L
51
52#if _GLIBCXX_HOSTED
53# define __cpp_lib_allocator_traits_is_always_equal 201411L
54#if __cplusplus <= 201703L // N.B. updated value in C++20
55# define __cpp_lib_shared_ptr_arrays 201611L
56#endif
57#endif
58
59#if !defined(__STRICT_ANSI__)
60// gnu++11
61# define __cpp_lib_is_swappable 201603L
62# define __cpp_lib_void_t 201411L
63# if _GLIBCXX_HOSTED
64#  define __cpp_lib_enable_shared_from_this 201603L
65# endif
66#endif
67
68// For C++11 and later we support ISO/IEC 29124 Mathematical Special Functions
69#define __STDCPP_MATH_SPEC_FUNCS__ 201003L
70
71#if __cplusplus >= 201402L
72// c++14
73#if __cpp_impl_coroutine
74# define __cpp_lib_coroutine 201902L
75#endif
76#define __cpp_lib_integral_constant_callable 201304L
77#define __cpp_lib_is_final 201402L
78#define __cpp_lib_transformation_trait_aliases 201304L
79
80#if _GLIBCXX_HOSTED
81# define __cpp_lib_chrono_udls 201304L
82# define __cpp_lib_complex_udls 201309L
83# define __cpp_lib_exchange_function 201304L
84# define __cpp_lib_generic_associative_lookup 201304L
85# define __cpp_lib_integer_sequence 201304L
86# define __cpp_lib_make_reverse_iterator 201402L
87# define __cpp_lib_make_unique 201304L
88# ifndef _GLIBCXX_DEBUG // PR libstdc++/70303
89#  define __cpp_lib_null_iterators 201304L
90# endif
91# define __cpp_lib_quoted_string_io 201304L
92# define __cpp_lib_robust_nonmodifying_seq_ops 201304L
93# ifdef _GLIBCXX_HAS_GTHREADS
94#  define __cpp_lib_shared_timed_mutex 201402L
95# endif
96# define __cpp_lib_string_udls 201304L
97# define __cpp_lib_transparent_operators 201510L
98# define __cpp_lib_tuple_element_t 201402L
99# define __cpp_lib_tuples_by_type 201304L
100#endif
101
102#if __cplusplus >= 201703L
103// c++17
104#define __cpp_lib_addressof_constexpr 201603L
105#define __cpp_lib_atomic_is_always_lock_free 201603L
106#define __cpp_lib_bool_constant 201505L
107#define __cpp_lib_byte 201603L
108#ifdef _GLIBCXX_HAVE_BUILTIN_HAS_UNIQ_OBJ_REP
109# define __cpp_lib_has_unique_object_representations 201606L
110#endif
111#ifdef __GCC_DESTRUCTIVE_SIZE
112# define __cpp_lib_hardware_interference_size 201703L
113#endif
114#ifdef _GLIBCXX_HAVE_BUILTIN_IS_AGGREGATE
115# define __cpp_lib_is_aggregate 201703L
116#endif
117#define __cpp_lib_is_invocable 201703L
118#define __cpp_lib_is_swappable 201603L
119#ifdef _GLIBCXX_HAVE_BUILTIN_LAUNDER
120# define __cpp_lib_launder 201606L
121#endif
122#define __cpp_lib_logical_traits 201510L
123#define __cpp_lib_type_trait_variable_templates 201510L
124#define __cpp_lib_uncaught_exceptions 201411L
125#define __cpp_lib_void_t 201411L
126
127#if _GLIBCXX_HOSTED
128#define __cpp_lib_any 201606L
129#define __cpp_lib_apply 201603L
130#if __cplusplus == 201703L // N.B. updated value in C++20
131# define __cpp_lib_array_constexpr 201803L
132#endif
133#define __cpp_lib_as_const 201510L
134#define __cpp_lib_boyer_moore_searcher 201603L
135#define __cpp_lib_chrono 201611L
136#define __cpp_lib_clamp 201603L
137#if __cplusplus == 201703L // N.B. updated value in C++20
138# if _GLIBCXX_HAVE_IS_CONSTANT_EVALUATED
139#  define __cpp_lib_constexpr_char_traits 201611L
140#  define __cpp_lib_constexpr_string 201611L
141# endif
142#endif
143#define __cpp_lib_enable_shared_from_this 201603L
144#define __cpp_lib_execution 201902L // FIXME: should be 201603L
145#define __cpp_lib_filesystem 201703L
146#define __cpp_lib_gcd 201606L
147#define __cpp_lib_gcd_lcm 201606L
148#define __cpp_lib_hypot 201603L
149#define __cpp_lib_invoke 201411L
150#define __cpp_lib_lcm 201606L
151#define __cpp_lib_make_from_tuple 201606L
152#define __cpp_lib_map_try_emplace 201411L
153#define __cpp_lib_math_special_functions 201603L
154#ifdef _GLIBCXX_HAS_GTHREADS
155# define __cpp_lib_memory_resource 201603L
156#else
157# define __cpp_lib_memory_resource 1
158#endif
159#define __cpp_lib_node_extract 201606L
160#define __cpp_lib_nonmember_container_access 201411L
161#define __cpp_lib_not_fn 201603L
162#if __cplusplus == 201703L // N.B. updated value in C++20
163# define __cpp_lib_optional 201606L
164#endif
165#define __cpp_lib_parallel_algorithm 201603L
166#define __cpp_lib_raw_memory_algorithms 201606L
167#define __cpp_lib_sample 201603L
168#ifdef _GLIBCXX_HAS_GTHREADS
169# define __cpp_lib_scoped_lock 201703L
170# define __cpp_lib_shared_mutex 201505L
171#endif
172#define __cpp_lib_shared_ptr_weak_type 201606L
173#define __cpp_lib_string_view 201803L
174#if _GLIBCXX_FLOAT_IS_IEEE_BINARY32 && _GLIBCXX_DOUBLE_IS_IEEE_BINARY64 \
175    && __SIZE_WIDTH__ >= 32
176# define __cpp_lib_to_chars 201611L
177#endif
178#define __cpp_lib_unordered_map_try_emplace 201411L
179#if !(__cpp_concepts >= 202002L && __cpp_constexpr >= 201811L)
180// N.B. updated value in C++20
181# define __cpp_lib_variant 202102L
182#endif
183#endif
184
185#if __cplusplus >= 202002L
186// c++20
187#define __cpp_lib_atomic_flag_test 201907L
188#define __cpp_lib_atomic_float 201711L
189#define __cpp_lib_atomic_ref 201806L
190#define __cpp_lib_atomic_value_initialization 201911L
191#if __has_builtin(__builtin_bit_cast)
192# define __cpp_lib_bit_cast 201806L
193#endif
194#define __cpp_lib_bitops 201907L
195#define __cpp_lib_bounded_array_traits 201902L
196// __cpp_lib_char8_t is defined in <bits/c++config.h>
197#if __cpp_concepts >= 201907L
198# define __cpp_lib_concepts 202002L
199#endif
200#if __cpp_impl_destroying_delete
201# define __cpp_lib_destroying_delete 201806L
202#endif
203#define __cpp_lib_endian 201907L
204#define __cpp_lib_int_pow2 202002L
205#ifdef _GLIBCXX_HAVE_IS_CONSTANT_EVALUATED
206# define __cpp_lib_is_constant_evaluated 201811L
207#endif
208#if __has_builtin(__is_layout_compatible) \
209  && __has_builtin(__builtin_is_corresponding_member)
210# define __cpp_lib_is_layout_compatible 201907L
211#endif
212#define __cpp_lib_is_nothrow_convertible 201806L
213#if __has_builtin(__is_pointer_interconvertible_base_of) \
214 && __has_builtin(__builtin_is_pointer_interconvertible_with_class)
215# define __cpp_lib_is_pointer_interconvertible 201907L
216#endif
217#define __cpp_lib_remove_cvref 201711L
218#if __has_builtin(__builtin_source_location)
219# define __cpp_lib_source_location 201907L
220#endif
221#if __cpp_impl_three_way_comparison >= 201907L && __cpp_lib_concepts
222# define __cpp_lib_three_way_comparison 201907L
223#endif
224#define __cpp_lib_type_identity 201806L
225#define __cpp_lib_unwrap_ref 201811L
226
227#if _GLIBCXX_HOSTED
228#define __cpp_lib_array_constexpr 201811L
229#define __cpp_lib_assume_aligned 201811L
230#define __cpp_lib_atomic_shared_ptr 201711L
231#if defined _GLIBCXX_HAS_GTHREADS || defined _GLIBCXX_HAVE_LINUX_FUTEX
232# define __cpp_lib_atomic_wait 201907L
233# if __cpp_aligned_new
234#  define __cpp_lib_barrier 201907L
235# endif
236#endif
237#define __cpp_lib_bind_front 201907L
238// FIXME: #define __cpp_lib_execution 201902L
239#define __cpp_lib_integer_comparison_functions 202002L
240#define __cpp_lib_constexpr_algorithms 201806L
241#ifdef __cpp_lib_is_constant_evaluated
242# define __cpp_lib_constexpr_char_traits 201811L
243#endif
244#define __cpp_lib_constexpr_complex 201711L
245#define __cpp_lib_constexpr_dynamic_alloc 201907L
246#define __cpp_lib_constexpr_functional 201907L
247#define __cpp_lib_constexpr_iterator 201811L
248#define __cpp_lib_constexpr_memory 201811L
249#define __cpp_lib_constexpr_numeric 201911L
250#ifdef __cpp_lib_is_constant_evaluated
251# if _GLIBCXX_USE_CXX11_ABI
252#  define __cpp_lib_constexpr_string 201907L
253# else
254#  define __cpp_lib_constexpr_string 201811L
255# endif
256#endif
257#define __cpp_lib_constexpr_string_view 201811L
258#define __cpp_lib_constexpr_tuple 201811L
259#define __cpp_lib_constexpr_utility 201811L
260#define __cpp_lib_constexpr_vector 201907L
261#define __cpp_lib_erase_if 202002L
262#define __cpp_lib_generic_unordered_lookup 201811L
263#define __cpp_lib_interpolate 201902L
264#ifdef _GLIBCXX_HAS_GTHREADS
265# define __cpp_lib_jthread 201911L
266#endif
267#if __cpp_lib_atomic_wait
268# define __cpp_lib_latch 201907L
269#endif
270#define __cpp_lib_list_remove_return_type 201806L
271#if __cpp_lib_concepts
272# define __cpp_lib_make_obj_using_allocator 201811L
273#endif
274#define __cpp_lib_math_constants 201907L
275#define __cpp_lib_optional 202106L
276#define __cpp_lib_polymorphic_allocator 201902L
277#if __cpp_lib_concepts
278# define __cpp_lib_ranges 202110L
279# define __cpp_lib_move_iterator_concept 202207L
280#endif
281#if __cpp_lib_atomic_wait || _GLIBCXX_HAVE_POSIX_SEMAPHORE
282# define __cpp_lib_semaphore 201907L
283#endif
284#define __cpp_lib_shared_ptr_arrays 201707L
285#define __cpp_lib_shift 201806L
286#define __cpp_lib_smart_ptr_for_overwrite 202002L
287#if __cpp_lib_concepts
288# define __cpp_lib_span 202002L
289#endif
290#define __cpp_lib_ssize 201902L
291#define __cpp_lib_starts_ends_with 201711L
292# if _GLIBCXX_USE_CXX11_ABI
293// Only supported with cxx11-abi
294#  define __cpp_lib_syncbuf 201803L
295# endif
296#define __cpp_lib_to_address 201711L
297#define __cpp_lib_to_array 201907L
298#if __cpp_concepts >= 202002L && __cpp_constexpr >= 201811L
299# define __cpp_lib_variant 202106L
300#endif
301#endif
302
303#if __cplusplus > 202002L
304// c++2b
305#define __cpp_lib_byteswap 202110L
306#define __cpp_lib_constexpr_typeinfo 202106L
307#define __cpp_lib_is_scoped_enum 202011L
308
309#if _GLIBCXX_HOSTED
310#define __cpp_lib_adaptor_iterator_pair_constructor 202106L
311#if __cpp_constexpr_dynamic_alloc
312# undef __cpp_lib_constexpr_memory
313# define __cpp_lib_constexpr_memory 202202L
314#endif
315#if __cpp_concepts >= 202002L
316# define __cpp_lib_expected 202202L
317#endif
318#define __cpp_lib_invoke_r 202106L
319#define __cpp_lib_ios_noreplace 202207L
320#if __cpp_lib_concepts
321# undef __cpp_lib_optional
322# define __cpp_lib_optional 202110L
323#endif
324#define __cpp_lib_move_only_function 202110L
325#if __cpp_lib_span
326# define __cpp_lib_spanstream 202106L
327#endif
328#if _GLIBCXX_HAVE_STACKTRACE
329# define __cpp_lib_stacktrace 202011L
330#endif
331#define __cpp_lib_stdatomic_h 202011L
332#define __cpp_lib_string_contains 202011L
333#if _GLIBCXX_USE_CXX11_ABI // Only supported with cxx11-abi
334# define __cpp_lib_string_resize_and_overwrite 202110L
335#endif
336#define __cpp_lib_to_underlying 202102L
337#define __cpp_lib_unreachable 202202L
338#endif
339#endif // C++2b
340#endif // C++20
341#endif // C++17
342#endif // C++14
343#endif // C++11
344
345#endif // _GLIBCXX_VERSION_INCLUDED
346