Each of following macros is defined if the header
or one of the corresponding headers specified in the table is included.
Macro name Value Header Free-
standing
__cpp_lib_adaptor_iterator_pair_constructor
202106L
201603L
Yes
__cpp_lib_algorithm_default_value_type
202603L
__cpp_lib_algorithm_iterator_requirements
202207L
202411L
Yes
202302L
__cpp_lib_allocator_traits_is_always_equal
201411L
Yes
201606L
202603L
Yes
201811L
Yes
201510L
Yes
__cpp_lib_associative_heterogeneous_erasure
202110L
__cpp_lib_associative_heterogeneous_insertion
202306L
201811L
Yes
201907L
Yes
201711L
Yes
__cpp_lib_atomic_is_always_lock_free
201603L
Yes
__cpp_lib_atomic_lock_free_type_aliases
201907L
202506L
Yes
202506L
Yes
202603L
Yes
201711L
__cpp_lib_atomic_value_initialization
201911L
Yes
201907L
Yes
202302L
202306L
Yes
202306L
Yes
201806L
Yes
202607L
Yes
202306L
201505L
Yes
__cpp_lib_bounded_array_traits
201902L
Yes
__cpp_lib_boyer_moore_searcher
201603L
201603L
Yes
202110L
Yes
201907L
Yes
202306L
201304L
201603L
Yes
202302L
Yes
__cpp_lib_common_reference_wrapper
202302L
Yes
201309L
202207L
Yes
202606L
Yes
__cpp_lib_constexpr_algorithms
202306L
202411L
202207L
202207L
Yes
202306L
202306L
202502L
__cpp_lib_constexpr_dynamic_alloc
201907L
__cpp_lib_constexpr_exceptions
202502L
202502L
202502L
202511L
__cpp_lib_constexpr_forward_list
202502L
__cpp_lib_constexpr_functional
201907L
Yes
__cpp_lib_constexpr_inplace_vector
202502L
201811L
Yes
202502L
202502L
202506L
Yes
202406L
Yes
201911L
Yes
202502L
202502L
202502L
202511L
__cpp_lib_constexpr_string_view
201811L
201811L
Yes
202106L
Yes
__cpp_lib_constexpr_unordered_map
202502L
__cpp_lib_constexpr_unordered_set
202502L
201811L
Yes
201907L
__cpp_lib_constrained_equality
202411L
Yes
202202L
202502L
Yes
202306L
201902L
Yes
202506L
202403L
Yes
202506L
Yes
201806L
Yes
__cpp_lib_enable_shared_from_this
201603L
201907L
Yes
202002L
202603L
201304L
Yes
201902L
202606L
201703L
202511L
202511L
202603L
202506L
202207L
202311L
202302L
202207L
Yes
__cpp_lib_freestanding_algorithm
202502L
Yes
202311L
Yes
__cpp_lib_freestanding_char_traits
202306L
Yes
__cpp_lib_freestanding_charconv
202306L
Yes
__cpp_lib_freestanding_cstdlib
202306L
Yes
__cpp_lib_freestanding_cstring
202311L
Yes
202306L
Yes
202306L
Yes
__cpp_lib_freestanding_execution
202502L
Yes
__cpp_lib_freestanding_expected
202311L
Yes
__cpp_lib_freestanding_feature_test_macros
202306LYes
__cpp_lib_freestanding_functional
202306L
Yes
__cpp_lib_freestanding_iterator
202306L
Yes
202311L
Yes
202502L
Yes
__cpp_lib_freestanding_numeric
202502L
Yes
__cpp_lib_freestanding_operator_new
202306L
Yes
__cpp_lib_freestanding_optional
202506L
Yes
202502L
Yes
202306L
Yes
202306L
Yes
__cpp_lib_freestanding_string_view
202311L
Yes
202306L
Yes
__cpp_lib_freestanding_utility
202306L
Yes
__cpp_lib_freestanding_variant
202311L
Yes
__cpp_lib_fstream_native_handle
202306L
202604L
Yes
201606L
Yes
202207L
__cpp_lib_generic_associative_lookup
201304L
__cpp_lib_generic_unordered_lookup
201811L
__cpp_lib_hardware_interference_size
201703L
Yes
__cpp_lib_has_unique_object_representations
201606L
Yes
202606L
202502L
201603L
__cpp_lib_incomplete_container_elements
201505L
202502L
202511L
Yes
202603L
202002L
Yes
__cpp_lib_integer_comparison_functions
202002L
Yes
202511L
Yes
__cpp_lib_integral_constant_callable
201304L
Yes
201902L
201411L
Yes
202106L
Yes
202207L
201703L
Yes
__cpp_lib_is_constant_evaluated
201811L
Yes
201402L
Yes
__cpp_lib_is_implicit_lifetime
202302L
Yes
201703L
Yes
__cpp_lib_is_layout_compatible
201907L
Yes
__cpp_lib_is_nothrow_convertible
201806L
Yes
201309L
Yes
__cpp_lib_is_pointer_interconvertible
201907L
Yes
202011L
Yes
202603L
Yes
__cpp_lib_is_sufficiently_aligned
202411L
Yes
201603L
Yes
202406L
Yes
202603L
Yes
201911L
201907L
201606L
Yes
202511L
__cpp_lib_list_remove_return_type
201806L
201510L
Yes
201606L
Yes
__cpp_lib_make_reverse_iterator
201402L
Yes
201304L
202606L
201411L
201907L
__cpp_lib_math_special_functions
201603L
202406L
Yes
202606L
201603L
202207LYes
__cpp_lib_move_iterator_concept
202207L
Yes
202110L
201606L
__cpp_lib_nonmember_container_access
201411L
Yes
202306L
Yes
201304L
Yes
__cpp_lib_observable_checkpoint
202506L
Yes
202506L
__cpp_lib_optional_range_support
202406L
Yes
202311L
Yes
202506L
202506L
202406L
202606L
Yes
202502L
__cpp_lib_polymorphic_allocator
201902L
202406L
201304L
202406L
202311L
Yes
202502L
Yes
202207L
Yes
202411L
Yes
__cpp_lib_ranges_cartesian_product
202207L
Yes
202202L
Yes
202202L
Yes
202403L
Yes
202207L
Yes
202302L
Yes
202603L
Yes
202207L
Yes
202207L
Yes
__cpp_lib_ranges_generate_random
202403L
202506L
202202L
Yes
202202L
Yes
202207L
Yes
202502L
202202L
Yes
__cpp_lib_ranges_starts_ends_with
202106L
Yes
202207L
Yes
202202L
Yes
202110L
Yes
202306L
Yes
__cpp_lib_raw_memory_algorithms
202411L
202306L
__cpp_lib_reference_from_temporary
202202L
Yes
202403L
Yes
202603L
201711L
Yes
__cpp_lib_replaceable_contract_violation_handler
202603L
Yes
201210L
Yes
__cpp_lib_robust_nonmodifying_seq_ops
201304L
Yes
201603L
Yes
__cpp_lib_saturation_arithmetic
202603L
Yes
201703L
201907L
202506L
201505L
201707L
__cpp_lib_shared_ptr_weak_type
201606L
201402L
202202L
202606L
202607L
202502L
202506L
__cpp_lib_smart_ptr_for_overwrite
202002L
__cpp_lib_smart_ptr_owner_equality
202306L
201907L
Yes
202311L
Yes
202106L
201902L
Yes
__cpp_lib_sstream_from_string_view
202306L
202011L
202603L
Yes
202207L
Yes
201711L
202011L
202603L
202603L
202011L
__cpp_lib_string_resize_and_overwrite
202110L
202506L
201304L
202403L
202603L
Yes
201803L
202506L
202306L
202606L
__cpp_lib_three_way_comparison
201907L
Yes
201711L
Yes
201907L
Yes
202606L
202306L
202102L
Yes
__cpp_lib_transformation_trait_aliases
201304L
Yes
__cpp_lib_transparent_operators
201510L
Yes
201402L
Yes
202311L
201304L
Yes
201806L
Yes
202506L
__cpp_lib_type_trait_variable_templates
201510L
Yes
201411L
Yes
__cpp_lib_unordered_map_try_emplace
201411L
202202L
Yes
201811L
Yes
202511L
202306L
202606L
201411L
Yes Total number of macros: 294
A hardened implementation also defines the following macros.
Macro name Value Header
202502L
__cpp_lib_hardened_basic_stacktrace
202506L
__cpp_lib_hardened_basic_string
202502L
__cpp_lib_hardened_basic_string_view
202502L
202502L
__cpp_lib_hardened_common_iterator
202506L
__cpp_lib_hardened_counted_iterator
202506L
202502L
202502L
__cpp_lib_hardened_forward_list
202502L
__cpp_lib_hardened_inplace_vector
202502L
202502L
202502L
202502L
__cpp_lib_hardened_shared_ptr_array
202506L
202502L
202502L
202502L
__cpp_lib_hardened_view_interface
202506L
Total number of macros: 19 Notes
Each value in "Value" column follows the pattern: "yyyymmL", where "yyyy" is a year, and "mm" is a month when the corresponding feature-set was accepted for standardization. Some values where increased since the time of their introduction, if capabilities of given feature where extended. The table above contains only the most recent values (that is, taken from the latest C++ language draft standard). A full set of values, including the initial and intermediate ones, can be found in
.
Defect reports
The following behavior-changing defect reports were applied retroactively to previously published C++ standards.
DR Applied to Behavior as published Correct behavior
C++20
C++23 some feature-test macros for fully
freestanding features were not freestanding they are also
freestanding See also