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_VERSIONH
11#define _LIBCPP_VERSIONH
12
13/*
14  version synopsis
15
16Macro name                                              Value   Headers
17__cpp_lib_adaptor_iterator_pair_constructor             202106L <queue> <stack>
18__cpp_lib_addressof_constexpr                           201603L <memory>
19__cpp_lib_allocate_at_least                             202106L <memory>
20__cpp_lib_allocator_traits_is_always_equal              201411L <deque> <forward_list> <list>
21                                                                <map> <memory> <scoped_allocator>
22                                                                <set> <string> <unordered_map>
23                                                                <unordered_set> <vector>
24__cpp_lib_any                                           201606L <any>
25__cpp_lib_apply                                         201603L <tuple>
26__cpp_lib_array_constexpr                               201811L <array> <iterator>
27                                                        201603L // C++17
28__cpp_lib_as_const                                      201510L <utility>
29__cpp_lib_associative_heterogeneous_erasure             202110L <map> <set> <unordered_map>
30                                                                <unordered_set>
31__cpp_lib_assume_aligned                                201811L <memory>
32__cpp_lib_atomic_flag_test                              201907L <atomic>
33__cpp_lib_atomic_float                                  201711L <atomic>
34__cpp_lib_atomic_is_always_lock_free                    201603L <atomic>
35__cpp_lib_atomic_lock_free_type_aliases                 201907L <atomic>
36__cpp_lib_atomic_ref                                    201806L <atomic>
37__cpp_lib_atomic_shared_ptr                             201711L <atomic>
38__cpp_lib_atomic_value_initialization                   201911L <atomic> <memory>
39__cpp_lib_atomic_wait                                   201907L <atomic>
40__cpp_lib_barrier                                       201907L <barrier>
41__cpp_lib_bind_back                                     202202L <functional>
42__cpp_lib_bind_front                                    201907L <functional>
43__cpp_lib_bit_cast                                      201806L <bit>
44__cpp_lib_bitops                                        201907L <bit>
45__cpp_lib_bool_constant                                 201505L <type_traits>
46__cpp_lib_bounded_array_traits                          201902L <type_traits>
47__cpp_lib_boyer_moore_searcher                          201603L <functional>
48__cpp_lib_byte                                          201603L <cstddef>
49__cpp_lib_byteswap                                      202110L <bit>
50__cpp_lib_char8_t                                       201907L <atomic> <filesystem> <istream>
51                                                                <limits> <locale> <ostream>
52                                                                <string> <string_view>
53__cpp_lib_chrono                                        201611L <chrono>
54__cpp_lib_chrono_udls                                   201304L <chrono>
55__cpp_lib_clamp                                         201603L <algorithm>
56__cpp_lib_complex_udls                                  201309L <complex>
57__cpp_lib_concepts                                      202002L <concepts>
58__cpp_lib_constexpr_algorithms                          201806L <algorithm>
59__cpp_lib_constexpr_cmath                               202202L <cmath> <cstdlib>
60__cpp_lib_constexpr_complex                             201711L <complex>
61__cpp_lib_constexpr_dynamic_alloc                       201907L <memory>
62__cpp_lib_constexpr_functional                          201907L <functional>
63__cpp_lib_constexpr_iterator                            201811L <iterator>
64__cpp_lib_constexpr_memory                              201811L <memory>
65__cpp_lib_constexpr_numeric                             201911L <numeric>
66__cpp_lib_constexpr_string                              201907L <string>
67__cpp_lib_constexpr_string_view                         201811L <string_view>
68__cpp_lib_constexpr_tuple                               201811L <tuple>
69__cpp_lib_constexpr_typeinfo                            202106L <typeinfo>
70__cpp_lib_constexpr_utility                             201811L <utility>
71__cpp_lib_constexpr_vector                              201907L <vector>
72__cpp_lib_coroutine                                     201902L <coroutine>
73__cpp_lib_destroying_delete                             201806L <new>
74__cpp_lib_enable_shared_from_this                       201603L <memory>
75__cpp_lib_endian                                        201907L <bit>
76__cpp_lib_erase_if                                      202002L <deque> <forward_list> <list>
77                                                                <map> <set> <string>
78                                                                <unordered_map> <unordered_set> <vector>
79__cpp_lib_exchange_function                             201304L <utility>
80__cpp_lib_execution                                     201902L <execution>
81                                                        201603L // C++17
82__cpp_lib_filesystem                                    201703L <filesystem>
83__cpp_lib_format                                        202106L <format>
84__cpp_lib_gcd_lcm                                       201606L <numeric>
85__cpp_lib_generic_associative_lookup                    201304L <map> <set>
86__cpp_lib_generic_unordered_lookup                      201811L <unordered_map> <unordered_set>
87__cpp_lib_hardware_interference_size                    201703L <new>
88__cpp_lib_has_unique_object_representations             201606L <type_traits>
89__cpp_lib_hypot                                         201603L <cmath>
90__cpp_lib_incomplete_container_elements                 201505L <forward_list> <list> <vector>
91__cpp_lib_int_pow2                                      202002L <bit>
92__cpp_lib_integer_comparison_functions                  202002L <utility>
93__cpp_lib_integer_sequence                              201304L <utility>
94__cpp_lib_integral_constant_callable                    201304L <type_traits>
95__cpp_lib_interpolate                                   201902L <cmath> <numeric>
96__cpp_lib_invoke                                        201411L <functional>
97__cpp_lib_invoke_r                                      202106L <functional>
98__cpp_lib_is_aggregate                                  201703L <type_traits>
99__cpp_lib_is_constant_evaluated                         201811L <type_traits>
100__cpp_lib_is_final                                      201402L <type_traits>
101__cpp_lib_is_invocable                                  201703L <type_traits>
102__cpp_lib_is_layout_compatible                          201907L <type_traits>
103__cpp_lib_is_nothrow_convertible                        201806L <type_traits>
104__cpp_lib_is_null_pointer                               201309L <type_traits>
105__cpp_lib_is_pointer_interconvertible                   201907L <type_traits>
106__cpp_lib_is_scoped_enum                                202011L <type_traits>
107__cpp_lib_is_swappable                                  201603L <type_traits>
108__cpp_lib_jthread                                       201911L <stop_token> <thread>
109__cpp_lib_latch                                         201907L <latch>
110__cpp_lib_launder                                       201606L <new>
111__cpp_lib_list_remove_return_type                       201806L <forward_list> <list>
112__cpp_lib_logical_traits                                201510L <type_traits>
113__cpp_lib_make_from_tuple                               201606L <tuple>
114__cpp_lib_make_reverse_iterator                         201402L <iterator>
115__cpp_lib_make_unique                                   201304L <memory>
116__cpp_lib_map_try_emplace                               201411L <map>
117__cpp_lib_math_constants                                201907L <numbers>
118__cpp_lib_math_special_functions                        201603L <cmath>
119__cpp_lib_memory_resource                               201603L <memory_resource>
120__cpp_lib_move_only_function                            202110L <functional>
121__cpp_lib_node_extract                                  201606L <map> <set> <unordered_map>
122                                                                <unordered_set>
123__cpp_lib_nonmember_container_access                    201411L <array> <deque> <forward_list>
124                                                                <iterator> <list> <map>
125                                                                <regex> <set> <string>
126                                                                <unordered_map> <unordered_set> <vector>
127__cpp_lib_not_fn                                        201603L <functional>
128__cpp_lib_null_iterators                                201304L <iterator>
129__cpp_lib_optional                                      202110L <optional>
130                                                        201606L // C++17
131__cpp_lib_out_ptr                                       202106L <memory>
132__cpp_lib_parallel_algorithm                            201603L <algorithm> <numeric>
133__cpp_lib_polymorphic_allocator                         201902L <memory_resource>
134__cpp_lib_quoted_string_io                              201304L <iomanip>
135__cpp_lib_ranges                                        201811L <algorithm> <functional> <iterator>
136                                                                <memory> <ranges>
137__cpp_lib_ranges_chunk                                  202202L <ranges>
138__cpp_lib_ranges_chunk_by                               202202L <ranges>
139__cpp_lib_ranges_iota                                   202202L <numeric>
140__cpp_lib_ranges_join_with                              202202L <ranges>
141__cpp_lib_ranges_slide                                  202202L <ranges>
142__cpp_lib_ranges_starts_ends_with                       202106L <algorithm>
143__cpp_lib_ranges_to_container                           202202L <deque> <forward_list> <list>
144                                                                <map> <priority_queue> <queue>
145                                                                <set> <stack> <string>
146                                                                <unordered_map> <unordered_set> <vector>
147__cpp_lib_ranges_zip                                    202110L <ranges> <tuple> <utility>
148__cpp_lib_raw_memory_algorithms                         201606L <memory>
149__cpp_lib_reference_from_temporary                      202202L <type_traits>
150__cpp_lib_remove_cvref                                  201711L <type_traits>
151__cpp_lib_result_of_sfinae                              201210L <functional> <type_traits>
152__cpp_lib_robust_nonmodifying_seq_ops                   201304L <algorithm>
153__cpp_lib_sample                                        201603L <algorithm>
154__cpp_lib_scoped_lock                                   201703L <mutex>
155__cpp_lib_semaphore                                     201907L <semaphore>
156__cpp_lib_shared_mutex                                  201505L <shared_mutex>
157__cpp_lib_shared_ptr_arrays                             201707L <memory>
158                                                        201611L // C++17
159__cpp_lib_shared_ptr_weak_type                          201606L <memory>
160__cpp_lib_shared_timed_mutex                            201402L <shared_mutex>
161__cpp_lib_shift                                         201806L <algorithm>
162__cpp_lib_smart_ptr_for_overwrite                       202002L <memory>
163__cpp_lib_source_location                               201907L <source_location>
164__cpp_lib_span                                          202002L <span>
165__cpp_lib_spanstream                                    202106L <spanstream>
166__cpp_lib_ssize                                         201902L <iterator>
167__cpp_lib_stacktrace                                    202011L <stacktrace>
168__cpp_lib_starts_ends_with                              201711L <string> <string_view>
169__cpp_lib_stdatomic_h                                   202011L <stdatomic.h>
170__cpp_lib_string_contains                               202011L <string> <string_view>
171__cpp_lib_string_resize_and_overwrite                   202110L <string>
172__cpp_lib_string_udls                                   201304L <string>
173__cpp_lib_string_view                                   201803L <string> <string_view>
174                                                        201606L // C++17
175__cpp_lib_syncbuf                                       201803L <syncstream>
176__cpp_lib_three_way_comparison                          201907L <compare>
177__cpp_lib_to_address                                    201711L <memory>
178__cpp_lib_to_array                                      201907L <array>
179__cpp_lib_to_chars                                      201611L <charconv>
180__cpp_lib_to_underlying                                 202102L <utility>
181__cpp_lib_transformation_trait_aliases                  201304L <type_traits>
182__cpp_lib_transparent_operators                         201510L <functional> <memory>
183                                                        201210L // C++14
184__cpp_lib_tuple_element_t                               201402L <tuple>
185__cpp_lib_tuples_by_type                                201304L <tuple> <utility>
186__cpp_lib_type_identity                                 201806L <type_traits>
187__cpp_lib_type_trait_variable_templates                 201510L <type_traits>
188__cpp_lib_uncaught_exceptions                           201411L <exception>
189__cpp_lib_unordered_map_try_emplace                     201411L <unordered_map>
190__cpp_lib_unreachable                                   202202L <utility>
191__cpp_lib_unwrap_ref                                    201811L <functional>
192__cpp_lib_variant                                       202102L <variant>
193__cpp_lib_void_t                                        201411L <type_traits>
194
195*/
196
197#include <__assert> // all public C++ headers provide the assertion handler
198#include <__config>
199
200#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
201#  pragma GCC system_header
202#endif
203
204// clang-format off
205
206#if _LIBCPP_STD_VER > 11
207# define __cpp_lib_chrono_udls                          201304L
208# define __cpp_lib_complex_udls                         201309L
209# define __cpp_lib_exchange_function                    201304L
210# define __cpp_lib_generic_associative_lookup           201304L
211# define __cpp_lib_integer_sequence                     201304L
212# define __cpp_lib_integral_constant_callable           201304L
213# define __cpp_lib_is_final                             201402L
214# define __cpp_lib_is_null_pointer                      201309L
215# define __cpp_lib_make_reverse_iterator                201402L
216# define __cpp_lib_make_unique                          201304L
217# define __cpp_lib_null_iterators                       201304L
218# define __cpp_lib_quoted_string_io                     201304L
219# define __cpp_lib_result_of_sfinae                     201210L
220# define __cpp_lib_robust_nonmodifying_seq_ops          201304L
221# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_timed_mutex)
222#   define __cpp_lib_shared_timed_mutex                 201402L
223# endif
224# define __cpp_lib_string_udls                          201304L
225# define __cpp_lib_transformation_trait_aliases         201304L
226# define __cpp_lib_transparent_operators                201210L
227# define __cpp_lib_tuple_element_t                      201402L
228# define __cpp_lib_tuples_by_type                       201304L
229#endif
230
231#if _LIBCPP_STD_VER > 14
232# define __cpp_lib_addressof_constexpr                  201603L
233# define __cpp_lib_allocator_traits_is_always_equal     201411L
234# define __cpp_lib_any                                  201606L
235# define __cpp_lib_apply                                201603L
236# define __cpp_lib_array_constexpr                      201603L
237# define __cpp_lib_as_const                             201510L
238# define __cpp_lib_atomic_is_always_lock_free           201603L
239# define __cpp_lib_bool_constant                        201505L
240# define __cpp_lib_boyer_moore_searcher                 201603L
241# define __cpp_lib_byte                                 201603L
242# define __cpp_lib_chrono                               201611L
243# define __cpp_lib_clamp                                201603L
244# define __cpp_lib_enable_shared_from_this              201603L
245// # define __cpp_lib_execution                            201603L
246# if !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_filesystem)
247#   define __cpp_lib_filesystem                         201703L
248# endif
249# define __cpp_lib_gcd_lcm                              201606L
250# if defined(__GCC_DESTRUCTIVE_SIZE) && defined(__GCC_CONSTRUCTIVE_SIZE)
251#   define __cpp_lib_hardware_interference_size         201703L
252# endif
253# define __cpp_lib_has_unique_object_representations    201606L
254# define __cpp_lib_hypot                                201603L
255# define __cpp_lib_incomplete_container_elements        201505L
256# define __cpp_lib_invoke                               201411L
257# define __cpp_lib_is_aggregate                         201703L
258# define __cpp_lib_is_invocable                         201703L
259# define __cpp_lib_is_swappable                         201603L
260# define __cpp_lib_launder                              201606L
261# define __cpp_lib_logical_traits                       201510L
262# define __cpp_lib_make_from_tuple                      201606L
263# define __cpp_lib_map_try_emplace                      201411L
264// # define __cpp_lib_math_special_functions               201603L
265// # define __cpp_lib_memory_resource                      201603L
266# define __cpp_lib_node_extract                         201606L
267# define __cpp_lib_nonmember_container_access           201411L
268# define __cpp_lib_not_fn                               201603L
269# define __cpp_lib_optional                             201606L
270// # define __cpp_lib_parallel_algorithm                   201603L
271# define __cpp_lib_raw_memory_algorithms                201606L
272# define __cpp_lib_sample                               201603L
273# define __cpp_lib_scoped_lock                          201703L
274# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_mutex)
275#   define __cpp_lib_shared_mutex                       201505L
276# endif
277# define __cpp_lib_shared_ptr_arrays                    201611L
278# define __cpp_lib_shared_ptr_weak_type                 201606L
279# define __cpp_lib_string_view                          201606L
280// # define __cpp_lib_to_chars                             201611L
281# undef  __cpp_lib_transparent_operators
282# define __cpp_lib_transparent_operators                201510L
283# define __cpp_lib_type_trait_variable_templates        201510L
284# define __cpp_lib_uncaught_exceptions                  201411L
285# define __cpp_lib_unordered_map_try_emplace            201411L
286# define __cpp_lib_variant                              202102L
287# define __cpp_lib_void_t                               201411L
288#endif
289
290#if _LIBCPP_STD_VER > 17
291# undef  __cpp_lib_array_constexpr
292# define __cpp_lib_array_constexpr                      201811L
293# define __cpp_lib_assume_aligned                       201811L
294# define __cpp_lib_atomic_flag_test                     201907L
295// # define __cpp_lib_atomic_float                         201711L
296# define __cpp_lib_atomic_lock_free_type_aliases        201907L
297// # define __cpp_lib_atomic_ref                           201806L
298// # define __cpp_lib_atomic_shared_ptr                    201711L
299# define __cpp_lib_atomic_value_initialization          201911L
300# if !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_atomic_wait)
301#   define __cpp_lib_atomic_wait                        201907L
302# endif
303# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_barrier)
304#   define __cpp_lib_barrier                            201907L
305# endif
306# define __cpp_lib_bind_front                           201907L
307# define __cpp_lib_bit_cast                             201806L
308// # define __cpp_lib_bitops                               201907L
309# define __cpp_lib_bounded_array_traits                 201902L
310# if !defined(_LIBCPP_HAS_NO_CHAR8_T)
311#   define __cpp_lib_char8_t                            201907L
312# endif
313# define __cpp_lib_concepts                             202002L
314# define __cpp_lib_constexpr_algorithms                 201806L
315// # define __cpp_lib_constexpr_complex                    201711L
316# define __cpp_lib_constexpr_dynamic_alloc              201907L
317# define __cpp_lib_constexpr_functional                 201907L
318# define __cpp_lib_constexpr_iterator                   201811L
319# define __cpp_lib_constexpr_memory                     201811L
320# define __cpp_lib_constexpr_numeric                    201911L
321# define __cpp_lib_constexpr_string                     201907L
322# define __cpp_lib_constexpr_string_view                201811L
323# define __cpp_lib_constexpr_tuple                      201811L
324# define __cpp_lib_constexpr_utility                    201811L
325// # define __cpp_lib_constexpr_vector                     201907L
326# define __cpp_lib_coroutine                            201902L
327# if _LIBCPP_STD_VER > 17 && defined(__cpp_impl_destroying_delete) && __cpp_impl_destroying_delete >= 201806L
328#   define __cpp_lib_destroying_delete                  201806L
329# endif
330# define __cpp_lib_endian                               201907L
331# define __cpp_lib_erase_if                             202002L
332# undef  __cpp_lib_execution
333// # define __cpp_lib_execution                            201902L
334# if !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_format) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)
335// #   define __cpp_lib_format                             202106L
336# endif
337# define __cpp_lib_generic_unordered_lookup             201811L
338# define __cpp_lib_int_pow2                             202002L
339# define __cpp_lib_integer_comparison_functions         202002L
340# define __cpp_lib_interpolate                          201902L
341# define __cpp_lib_is_constant_evaluated                201811L
342// # define __cpp_lib_is_layout_compatible                 201907L
343# define __cpp_lib_is_nothrow_convertible               201806L
344// # define __cpp_lib_is_pointer_interconvertible          201907L
345# if !defined(_LIBCPP_HAS_NO_THREADS)
346// #   define __cpp_lib_jthread                            201911L
347# endif
348# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_latch)
349#   define __cpp_lib_latch                              201907L
350# endif
351# define __cpp_lib_list_remove_return_type              201806L
352# define __cpp_lib_math_constants                       201907L
353// # define __cpp_lib_polymorphic_allocator                201902L
354# if !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
355#   define __cpp_lib_ranges                             201811L
356# endif
357# define __cpp_lib_remove_cvref                         201711L
358# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_semaphore)
359#   define __cpp_lib_semaphore                          201907L
360# endif
361# undef  __cpp_lib_shared_ptr_arrays
362# define __cpp_lib_shared_ptr_arrays                    201707L
363# define __cpp_lib_shift                                201806L
364// # define __cpp_lib_smart_ptr_for_overwrite              202002L
365// # define __cpp_lib_source_location                      201907L
366# define __cpp_lib_span                                 202002L
367# define __cpp_lib_ssize                                201902L
368# define __cpp_lib_starts_ends_with                     201711L
369# undef  __cpp_lib_string_view
370# define __cpp_lib_string_view                          201803L
371// # define __cpp_lib_syncbuf                              201803L
372// # define __cpp_lib_three_way_comparison                 201907L
373# define __cpp_lib_to_address                           201711L
374# define __cpp_lib_to_array                             201907L
375# define __cpp_lib_type_identity                        201806L
376# define __cpp_lib_unwrap_ref                           201811L
377#endif
378
379#if _LIBCPP_STD_VER > 20
380# define __cpp_lib_adaptor_iterator_pair_constructor    202106L
381# define __cpp_lib_allocate_at_least                    202106L
382// # define __cpp_lib_associative_heterogeneous_erasure    202110L
383// # define __cpp_lib_bind_back                            202202L
384# define __cpp_lib_byteswap                             202110L
385// # define __cpp_lib_constexpr_cmath                      202202L
386// # define __cpp_lib_constexpr_typeinfo                   202106L
387// # define __cpp_lib_invoke_r                             202106L
388# define __cpp_lib_is_scoped_enum                       202011L
389// # define __cpp_lib_move_only_function                   202110L
390# undef  __cpp_lib_optional
391# define __cpp_lib_optional                             202110L
392// # define __cpp_lib_out_ptr                              202106L
393// # define __cpp_lib_ranges_chunk                         202202L
394// # define __cpp_lib_ranges_chunk_by                      202202L
395// # define __cpp_lib_ranges_iota                          202202L
396// # define __cpp_lib_ranges_join_with                     202202L
397// # define __cpp_lib_ranges_slide                         202202L
398// # define __cpp_lib_ranges_starts_ends_with              202106L
399// # define __cpp_lib_ranges_to_container                  202202L
400// # define __cpp_lib_ranges_zip                           202110L
401// # define __cpp_lib_reference_from_temporary             202202L
402// # define __cpp_lib_spanstream                           202106L
403// # define __cpp_lib_stacktrace                           202011L
404# define __cpp_lib_stdatomic_h                          202011L
405# define __cpp_lib_string_contains                      202011L
406# define __cpp_lib_string_resize_and_overwrite          202110L
407# define __cpp_lib_to_underlying                        202102L
408# define __cpp_lib_unreachable                          202202L
409#endif
410
411// clang-format on
412
413#endif // _LIBCPP_VERSIONH
414