]> gcc.gnu.org Git - gcc.git/blame - libstdc++-v3/include/std/version
libstdc++: Implement P2520R0 changes to move_iterator's iterator_concept
[gcc.git] / libstdc++-v3 / include / std / version
CommitLineData
410fb7d7
JW
1// -*- C++ -*- Libstdc++ version details header.
2
83ffe9cd 3// Copyright (C) 2018-2023 Free Software Foundation, Inc.
410fb7d7
JW
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
c6a7be9b 38#if _GLIBCXX_HOSTED
b8806796 39# define __cpp_lib_incomplete_container_elements 201505L
c6a7be9b 40#endif
410fb7d7
JW
41
42#if !defined(__STRICT_ANSI__)
43// gnu++03
56a9eaf9 44# define __cpp_lib_uncaught_exceptions 201411L
410fb7d7
JW
45#endif
46
47#if __cplusplus >= 201103L
48// c++11
18f176d0 49#define __cpp_lib_allocator_traits_is_always_equal 201411L
b8806796
JW
50#define __cpp_lib_is_null_pointer 201309L
51#define __cpp_lib_result_of_sfinae 201210L
c6a7be9b
JW
52
53#if _GLIBCXX_HOSTED
2da1ef06 54#if __cplusplus <= 201703L // N.B. updated value in C++20
c6a7be9b
JW
55# define __cpp_lib_shared_ptr_arrays 201611L
56#endif
9a0b518a 57#endif
410fb7d7
JW
58
59#if !defined(__STRICT_ANSI__)
60// gnu++11
b8806796
JW
61# define __cpp_lib_is_swappable 201603L
62# define __cpp_lib_void_t 201411L
c6a7be9b 63# if _GLIBCXX_HOSTED
b8806796 64# define __cpp_lib_enable_shared_from_this 201603L
c6a7be9b 65# endif
410fb7d7
JW
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
dcf69ac5
IS
73#if __cpp_impl_coroutine
74# define __cpp_lib_coroutine 201902L
75#endif
18f176d0
AA
76#define __cpp_lib_exchange_function 201304L
77#define __cpp_lib_integer_sequence 201304L
b8806796 78#define __cpp_lib_integral_constant_callable 201304L
410fb7d7 79#define __cpp_lib_is_final 201402L
18f176d0
AA
80#define __cpp_lib_make_reverse_iterator 201402L
81#ifndef _GLIBCXX_DEBUG // PR libstdc++/70303
82# define __cpp_lib_null_iterators 201304L
83#endif
b8806796 84#define __cpp_lib_transformation_trait_aliases 201304L
18f176d0
AA
85#define __cpp_lib_transparent_operators 201510L
86#define __cpp_lib_tuple_element_t 201402L
87#define __cpp_lib_tuples_by_type 201304L
c6a7be9b
JW
88
89#if _GLIBCXX_HOSTED
b8806796
JW
90# define __cpp_lib_chrono_udls 201304L
91# define __cpp_lib_complex_udls 201309L
b8806796 92# define __cpp_lib_generic_associative_lookup 201304L
b8806796 93# define __cpp_lib_make_unique 201304L
b8806796
JW
94# define __cpp_lib_quoted_string_io 201304L
95# define __cpp_lib_robust_nonmodifying_seq_ops 201304L
c6a7be9b 96# ifdef _GLIBCXX_HAS_GTHREADS
f5d9bc8a 97# define __cpp_lib_shared_timed_mutex 201402L
c6a7be9b 98# endif
b8806796 99# define __cpp_lib_string_udls 201304L
c6a7be9b 100#endif
410fb7d7
JW
101
102#if __cplusplus >= 201703L
103// c++17
b8806796 104#define __cpp_lib_addressof_constexpr 201603L
18f176d0
AA
105#define __cpp_lib_any 201606L
106#define __cpp_lib_apply 201603L
107#define __cpp_lib_as_const 201510L
b8806796
JW
108#define __cpp_lib_atomic_is_always_lock_free 201603L
109#define __cpp_lib_bool_constant 201505L
110#define __cpp_lib_byte 201603L
ff273400 111#ifdef _GLIBCXX_HAVE_BUILTIN_HAS_UNIQ_OBJ_REP
b8806796 112# define __cpp_lib_has_unique_object_representations 201606L
ff273400 113#endif
bd81327b
JW
114#ifdef __GCC_DESTRUCTIVE_SIZE
115# define __cpp_lib_hardware_interference_size 201703L
116#endif
18f176d0 117#define __cpp_lib_invoke 201411L
ff273400 118#ifdef _GLIBCXX_HAVE_BUILTIN_IS_AGGREGATE
b8806796 119# define __cpp_lib_is_aggregate 201703L
ff273400 120#endif
b8806796
JW
121#define __cpp_lib_is_invocable 201703L
122#define __cpp_lib_is_swappable 201603L
ff273400 123#ifdef _GLIBCXX_HAVE_BUILTIN_LAUNDER
b8806796 124# define __cpp_lib_launder 201606L
ff273400 125#endif
b8806796 126#define __cpp_lib_logical_traits 201510L
18f176d0
AA
127#define __cpp_lib_make_from_tuple 201606L
128#define __cpp_lib_not_fn 201603L
129#if __cplusplus == 201703L // N.B. updated value in C++20
130# define __cpp_lib_optional 201606L
131#endif
c6a7be9b
JW
132#define __cpp_lib_type_trait_variable_templates 201510L
133#define __cpp_lib_uncaught_exceptions 201411L
18f176d0
AA
134#if !(__cpp_concepts >= 202002L && __cpp_constexpr >= 201811L)
135// N.B. updated value in C++20
136# define __cpp_lib_variant 202102L
137#endif
b8806796 138#define __cpp_lib_void_t 201411L
c6a7be9b
JW
139
140#if _GLIBCXX_HOSTED
f903c13c
JW
141#if __cplusplus == 201703L // N.B. updated value in C++20
142# define __cpp_lib_array_constexpr 201803L
143#endif
b8806796
JW
144#define __cpp_lib_boyer_moore_searcher 201603L
145#define __cpp_lib_chrono 201611L
146#define __cpp_lib_clamp 201603L
f903c13c 147#if __cplusplus == 201703L // N.B. updated value in C++20
74d14778 148# if _GLIBCXX_HAVE_IS_CONSTANT_EVALUATED
b376b1ef
JW
149# define __cpp_lib_constexpr_char_traits 201611L
150# define __cpp_lib_constexpr_string 201611L
151# endif
f903c13c 152#endif
b8806796 153#define __cpp_lib_enable_shared_from_this 201603L
aac39307 154#define __cpp_lib_execution 201902L // FIXME: should be 201603L
b8806796
JW
155#define __cpp_lib_filesystem 201703L
156#define __cpp_lib_gcd 201606L
157#define __cpp_lib_gcd_lcm 201606L
b8806796 158#define __cpp_lib_hypot 201603L
b8806796 159#define __cpp_lib_lcm 201606L
b8806796 160#define __cpp_lib_map_try_emplace 201411L
410fb7d7 161#define __cpp_lib_math_special_functions 201603L
c5be6481 162#ifdef _GLIBCXX_HAS_GTHREADS
b1e7c6fc 163# define __cpp_lib_memory_resource 201603L
c5be6481
JW
164#else
165# define __cpp_lib_memory_resource 1
166#endif
b8806796
JW
167#define __cpp_lib_node_extract 201606L
168#define __cpp_lib_nonmember_container_access 201411L
b8a28a06 169#define __cpp_lib_parallel_algorithm 201603L
56a9eaf9 170#define __cpp_lib_raw_memory_algorithms 201606L
b8806796 171#define __cpp_lib_sample 201603L
ff273400 172#ifdef _GLIBCXX_HAS_GTHREADS
b8806796 173# define __cpp_lib_scoped_lock 201703L
f5d9bc8a 174# define __cpp_lib_shared_mutex 201505L
ff273400 175#endif
9a0b518a 176#define __cpp_lib_shared_ptr_weak_type 201606L
d0330a03 177#define __cpp_lib_string_view 201803L
5a4e2080
JW
178#if _GLIBCXX_FLOAT_IS_IEEE_BINARY32 && _GLIBCXX_DOUBLE_IS_IEEE_BINARY64 \
179 && __SIZE_WIDTH__ >= 32
f1a68574
JW
180# define __cpp_lib_to_chars 201611L
181#endif
b8806796 182#define __cpp_lib_unordered_map_try_emplace 201411L
c6a7be9b 183#endif
410fb7d7 184
f78f25f4 185#if __cplusplus >= 202002L
f004d6d9 186// c++20
18f176d0 187#define __cpp_lib_assume_aligned 201811L
491ba663 188#define __cpp_lib_atomic_flag_test 201907L
56772f62 189#define __cpp_lib_atomic_float 201711L
320ac807 190#define __cpp_lib_atomic_lock_free_type_aliases 201907L
a90fe12c 191#define __cpp_lib_atomic_ref 201806L
e4379a93 192#define __cpp_lib_atomic_value_initialization 201911L
18f176d0 193#define __cpp_lib_bind_front 201907L
42d3f743 194#define __cpp_lib_starts_ends_with 201711L
bd81327b
JW
195#if __has_builtin(__builtin_bit_cast)
196# define __cpp_lib_bit_cast 201806L
197#endif
0d58d88d 198#define __cpp_lib_bitops 201907L
46610940 199#define __cpp_lib_bounded_array_traits 201902L
56772f62 200// __cpp_lib_char8_t is defined in <bits/c++config.h>
b8a28a06 201#if __cpp_concepts >= 201907L
c9313582 202# define __cpp_lib_concepts 202002L
cfc219ae 203#endif
329c0f89
JW
204#if __cpp_impl_destroying_delete
205# define __cpp_lib_destroying_delete 201806L
206#endif
42d3f743 207#define __cpp_lib_constexpr_string_view 201811L
a5378f9b 208#define __cpp_lib_endian 201907L
9866abe3 209#define __cpp_lib_int_pow2 202002L
18f176d0 210#define __cpp_lib_integer_comparison_functions 202002L
74d14778 211#ifdef _GLIBCXX_HAVE_IS_CONSTANT_EVALUATED
134a6f7b
JJ
212# define __cpp_lib_is_constant_evaluated 201811L
213#endif
bd81327b
JW
214#if __has_builtin(__is_layout_compatible) \
215 && __has_builtin(__builtin_is_corresponding_member)
216# define __cpp_lib_is_layout_compatible 201907L
217#endif
56772f62 218#define __cpp_lib_is_nothrow_convertible 201806L
bd81327b
JW
219#if __has_builtin(__is_pointer_interconvertible_base_of) \
220 && __has_builtin(__builtin_is_pointer_interconvertible_with_class)
221# define __cpp_lib_is_pointer_interconvertible 201907L
222#endif
18f176d0
AA
223#define __cpp_lib_math_constants 201907L
224#if __cpp_lib_concepts
225# define __cpp_lib_make_obj_using_allocator 201811L
226#endif
227#define __cpp_lib_optional 202106L
56772f62 228#define __cpp_lib_remove_cvref 201711L
8b35f02e
JW
229#if __has_builtin(__builtin_source_location)
230# define __cpp_lib_source_location 201907L
231#endif
18f176d0
AA
232#if __cpp_lib_concepts
233# define __cpp_lib_span 202002L
234#endif
235#define __cpp_lib_ssize 201902L
a2dcb56c
JW
236#if __cpp_impl_three_way_comparison >= 201907L && __cpp_lib_concepts
237# define __cpp_lib_three_way_comparison 201907L
238#endif
18f176d0
AA
239#define __cpp_lib_to_address 201711L
240#define __cpp_lib_to_array 201907L
56772f62 241#define __cpp_lib_type_identity 201806L
bb54e0b8 242#define __cpp_lib_unwrap_ref 201811L
18f176d0
AA
243#if __cpp_concepts >= 202002L && __cpp_constexpr >= 201811L
244# define __cpp_lib_variant 202106L
245#endif
c6a7be9b
JW
246
247#if _GLIBCXX_HOSTED
e851aa17 248#define __cpp_lib_array_constexpr 201811L
2ac0649d 249#define __cpp_lib_atomic_shared_ptr 201711L
6591e422
TR
250#if defined _GLIBCXX_HAS_GTHREADS || defined _GLIBCXX_HAVE_LINUX_FUTEX
251# define __cpp_lib_atomic_wait 201907L
b7c3f201 252# if __cpp_aligned_new
194a9d67
JW
253# define __cpp_lib_barrier 201907L
254# endif
6591e422 255#endif
9fc61d45
JW
256// #undef __cpp_lib_chrono
257// #define __cpp_lib_chrono 201907L
aac39307 258// FIXME: #define __cpp_lib_execution 201902L
c6a7be9b 259#define __cpp_lib_constexpr_algorithms 201806L
b376b1ef
JW
260#ifdef __cpp_lib_is_constant_evaluated
261# define __cpp_lib_constexpr_char_traits 201811L
262#endif
393283b8 263#define __cpp_lib_constexpr_complex 201711L
c6a7be9b 264#define __cpp_lib_constexpr_dynamic_alloc 201907L
eca477d1 265#define __cpp_lib_constexpr_functional 201907L
b6ab9ecd 266#define __cpp_lib_constexpr_iterator 201811L
56772f62 267#define __cpp_lib_constexpr_memory 201811L
fd335985 268#define __cpp_lib_constexpr_numeric 201911L
b376b1ef 269#ifdef __cpp_lib_is_constant_evaluated
b96e2ff9
ML
270# if _GLIBCXX_USE_CXX11_ABI
271# define __cpp_lib_constexpr_string 201907L
272# else
273# define __cpp_lib_constexpr_string 201811L
274# endif
b376b1ef 275#endif
d0330a03
JW
276#define __cpp_lib_constexpr_tuple 201811L
277#define __cpp_lib_constexpr_utility 201811L
d2f8208e 278#define __cpp_lib_constexpr_vector 201907L
55b00d14 279#define __cpp_lib_erase_if 202002L
f78f25f4 280#define __cpp_lib_generic_unordered_lookup 201811L
c6a7be9b 281#define __cpp_lib_interpolate 201902L
e73ca078 282#ifdef _GLIBCXX_HAS_GTHREADS
aa12ab2e 283# define __cpp_lib_jthread 201911L
e73ca078 284#endif
670f5095 285#if __cpp_lib_atomic_wait
71988274
JW
286# define __cpp_lib_latch 201907L
287#endif
afa07bdd 288#define __cpp_lib_list_remove_return_type 201806L
56772f62 289#define __cpp_lib_polymorphic_allocator 201902L
b8a28a06 290#if __cpp_lib_concepts
5e1b17f0 291# define __cpp_lib_ranges 202110L
2b204acc 292# define __cpp_lib_move_iterator_concept 202207L
b8a28a06 293#endif
3215d4f5 294#if __cpp_lib_atomic_wait || _GLIBCXX_HAVE_POSIX_SEMAPHORE
183ae52b
JW
295# define __cpp_lib_semaphore 201907L
296#endif
9a0b518a 297#define __cpp_lib_shared_ptr_arrays 201707L
56772f62 298#define __cpp_lib_shift 201806L
9a0b518a 299#define __cpp_lib_smart_ptr_for_overwrite 202002L
6bcbcea0 300# if _GLIBCXX_USE_CXX11_ABI
7244879b 301// Only supported with cxx11-abi
6bcbcea0
TR
302# define __cpp_lib_syncbuf 201803L
303# endif
c6a7be9b 304#endif
f004d6d9
PF
305
306#if __cplusplus > 202002L
9a15d3be 307// c++23
7393fa8b 308#define __cpp_lib_byteswap 202110L
0f481550 309#define __cpp_lib_constexpr_charconv 202207L
3633cc54 310#define __cpp_lib_constexpr_typeinfo 202106L
18f176d0 311#if __cpp_concepts >= 202002L
8d9e2776 312# define __cpp_lib_expected 202211L
18f176d0
AA
313#endif
314#define __cpp_lib_invoke_r 202106L
bd81327b 315#define __cpp_lib_is_scoped_enum 202011L
18f176d0
AA
316#if __cpp_lib_concepts
317# undef __cpp_lib_optional
318# define __cpp_lib_optional 202110L
319#endif
9a15d3be 320#define __cpp_lib_reference_from_temporary 202202L
18f176d0
AA
321#define __cpp_lib_to_underlying 202102L
322#define __cpp_lib_unreachable 202202L
f7bd48c6
PP
323#define __cpp_lib_ranges_zip 202110L
324#define __cpp_lib_ranges_chunk 202202L
325#define __cpp_lib_ranges_slide 202202L
326#define __cpp_lib_ranges_chunk_by 202202L
327#define __cpp_lib_ranges_join_with 202202L
328#define __cpp_lib_ranges_repeat 202207L
329#define __cpp_lib_ranges_stride 202207L
330#define __cpp_lib_ranges_cartesian_product 202207L
331#define __cpp_lib_ranges_as_rvalue 202207L
bd81327b
JW
332
333#if _GLIBCXX_HOSTED
334#define __cpp_lib_adaptor_iterator_pair_constructor 202106L
2fbdcf5e 335#if __cpp_constexpr_dynamic_alloc
9194c139 336# define __cpp_lib_constexpr_bitset 202202L
2fbdcf5e
JW
337# undef __cpp_lib_constexpr_memory
338# define __cpp_lib_constexpr_memory 202202L
339#endif
3e9bd6b2 340#define __cpp_lib_ios_noreplace 202207L
881d1689 341#define __cpp_lib_move_only_function 202110L
a30a2e43
JW
342#if __cpp_lib_span
343# define __cpp_lib_spanstream 202106L
344#endif
3acb929c
JW
345#if _GLIBCXX_HAVE_STACKTRACE
346# define __cpp_lib_stacktrace 202011L
347#endif
d2f8208e 348#define __cpp_lib_stdatomic_h 202011L
f004d6d9 349#define __cpp_lib_string_contains 202011L
929abc7f
JW
350#if _GLIBCXX_USE_CXX11_ABI // Only supported with cxx11-abi
351# define __cpp_lib_string_resize_and_overwrite 202110L
352#endif
bd81327b 353#endif
9a15d3be 354#endif // C++23
f004d6d9 355#endif // C++20
410fb7d7
JW
356#endif // C++17
357#endif // C++14
358#endif // C++11
359
360#endif // _GLIBCXX_VERSION_INCLUDED
This page took 0.657452 seconds and 5 git commands to generate.