Namespaces
Variants

Проверка возможностей (начиная с C++20)

От ru.cppreference.net
< cpp

Стандарт определяет набор макросов препроцессора, соответствующих возможностям языка и библиотеки C++, введённым в C++11 или позднее. Они предназначены для простого и переносимого обнаружения наличия указанных возможностей.

Атрибуты

__has_cpp_attribute( attribute-token )

Проверяет поддержку атрибута с именем attribute-token (после раскрытия макроса).

Для каждого стандартного атрибута определяется реализацией, раскрывается ли __has_cpp_attribute в значение, приведённое в таблице ниже (год и месяц, когда атрибут был добавлен в рабочий проект), или в 0. Он раскроется в указанное значение в таблице, если и только если стандартный атрибут заставляет реализацию вести себя как рекомендовано (выдача диагностических сообщений, влияние на размещение классов и т.д.).

Наличие атрибутов, определённых поставщиком, определяется ненулевым значением.

__has_cpp_attribute может использоваться в выражении #if и #elif. Он рассматривается как определённый макрос директивами #ifdef, #ifndef, #elifdef, #elifndef(начиная с C++23) и defined, но не может использоваться где-либо ещё.

attribute-token Атрибут Значение Стандарт Документ(ы)
assume [[assume]] 202207L (C++23) P1774R8
carries_dependency [[carries_dependency]] 200809L (C++11)
(до C++26)
N2556
N2643
P3475R2
deprecated [[deprecated]] 201309L (C++14) N3760
fallthrough [[fallthrough]] 201603L (C++17) P0188R1
indeterminate [[indeterminate]] 202403L (C++26) P2795R5
likely [[likely]] 201803L (C++20) P0479R5
maybe_unused [[maybe_unused]] 201603L (C++17) P0212R1
no_unique_address [[no_unique_address]] 201803L (C++20) P0840R2
nodiscard [[nodiscard]] 201603L (C++17) P0189R1
[[nodiscard]] с причиной 201907L (C++20) P1301R4
noreturn [[noreturn]] 200809L (C++11) N2761
unlikely [[unlikely]] 201803L (C++20) P0479R5
Общее количество атрибутов: 11

Возможности языка

Следующие макросы могут использоваться для обнаружения, реализована ли возможность языка текущей реализацией. Они являются предопределёнными в каждой единице трансляции.

Каждый макрос раскрывается в целочисленный литерал, соответствующий году и месяцу, когда соответствующая возможность была включена в рабочий проект. Когда возможность существенно меняется, макрос обновляется соответствующим образом.

Имя макроса Возможность Значение Стандарт Документ(ы)
__cpp_aggregate_bases Агрегатные классы с базовыми классами 201603L (C++17) P0017R1
__cpp_aggregate_nsdmi Агрегатные классы с инициализаторами членов по умолчанию 201304L (C++14) N3653
__cpp_aggregate_paren_init Агрегатная инициализация в форме прямой инициализации 201902L (C++20) P0960R3
__cpp_alias_templates Псевдонимы шаблонов 200704L (C++11) N2258
__cpp_aligned_new Динамическое выделение памяти для данных со сверхвыравниванием 201606L (C++17) P0035R4
__cpp_attributes Атрибуты 200809L (C++11) N2761
__cpp_auto_cast Приведение выражения к prvalue (auto(x)) 202110L (C++23) P0849R8
__cpp_binary_literals Двоичные литералы 201304L (C++14) N3472
__cpp_capture_star_this Захват лямбдой *this по значению как [=,*this] 201603L (C++17) P0018R3
__cpp_char8_t char8_t 201811L (C++20) P0482R6
char8_t Исправление совместимости и переносимости (разрешение инициализации массивов (unsigned) char из строковых литералов UTF-8) 202207L (C++23)
(DR20)
P2513R4
__cpp_concepts Концепции 201907L (C++20) P0734R0
P1084R2
P1452R2
Условные тривиальные специальные функции-члены 202002L P0848R3
P2493R0
Условные спецификаторы noexcept в составных требованиях 202606L (C++29) P3822R2
__cpp_conditional_explicit Условный explicit спецификатор 201806L (C++20) P0892R2
__cpp_consteval Немедленные функции 201811L (C++20) P1073R3
Распространение consteval вверх 202211L (C++23)
(DR20)
P2564R3
Значения только consteval 202606L (C++29)
(DR26)
P4101R1
__cpp_constexpr constexpr 200704L (C++11) N2235
Ослабленный constexpr, не-const constexpr методы 201304L (C++14) N3652
Constexpr лямбда 201603L (C++17) P0170R1
Вызов виртуальной функции в константных выражениях; блоки try в constexpr-функциях, dynamic_cast и полиморфный typeid в константных выражениях; тривиальная инициализация по умолчанию и asm-declaration в constexpr-функциях (C++20) 201907L P1064R0 P1002R1
P1327R1
P1331R2
P1668R1
Изменение активного члена объединения при константном вычислении
P1330R0 202002L P2493R0
Не-
литеральные переменные, метки и операторы goto в constexpr-функциях (C++23) 202110L P2242R3 Ослабление некоторых ограничений на
constexpr функции и шаблоны функций P2448R2 202207L Разрешение статических constexpr переменных в constexpr-функциях
P2647R1 202211L Constexpr приведение из
: на пути к constexpr стиранию типа void*(C++26) 202306L P2738R1 Constexpr
placement newP2747R2 202406L Операции для времени хранения с динамической продолжительностью в constexpr-функциях
__cpp_constexpr_dynamic_alloc (C++20) 201907L P0784R7 Constexpr
__cpp_constexpr_exceptions исключения(C++26) 202411L P3068R6 Генерация определений функций и переменных, когда
__cpp_constexpr_in_decltype необходимо для константного вычисления(C++20) 201711L (DR11)
P0859R0
Constexpr виртуальное наследование
__cpp_constexpr_virtual_inheritance (C++26) 202506L P3533R2 constinit
__cpp_constinit (C++20) 201907L P1143R2 Контракты
__cpp_contracts (C++26) 202502L P2900R14 Контракты
для виртуальных функций(C++29) 202606L P3097R3 decltype
__cpp_decltype (C++11) 200707L N2343 Вывод типа возврата для обычных функций
__cpp_decltype_auto (C++14) 201304L N3638 Вывод аргументов шаблона для шаблонов классов
__cpp_deduction_guides (CTAD) (C++17) 201703L P0091R3 P0512R0
P0620R0
CTAD для агрегатов и псевдонимов
(C++20) 201907L P1814R0 P1816R0
Делегирующие конструкторы
__cpp_delegating_constructors (C++11) 200604L N1986 Удалённые
__cpp_deleted_function определения функций с сообщениями () = delete("should have a reason");(C++26) 202403L P2573R2 Именованные инициализаторы
__cpp_designated_initializers (C++20) 201707L P0329R4 Именованные инициализаторы
для базовых классов (C++29) 202606L P2287R6 Атрибуты для
__cpp_enumerator_attributes перечислителей(C++17) 201411L N4266 Операторы развёртывания (
__cpp_expansion_statements ) template for(C++26) 202506L P1306R5 Явный параметр объекта
__cpp_explicit_this_parameter (C++23) 202110L P0847R7 Свёрнутые выражения
__cpp_fold_expressions (C++17) 201603L N4295 P0036R0
Упорядочивание
ограничений с участием свёрнутых выражений(C++26) 202406L P2963R3 Обобщённые лямбда-выражения
__cpp_generic_lambdas (C++14) 201304L N3649 Явный список параметров шаблона для
обобщённых лямбд(C++20) 201707L P0428R2 Гарантированный пропуск копирования через упрощённые
__cpp_guaranteed_copy_elision категории значений(C++17) 201606L P0135R1 Шестнадцатеричные литералы с плавающей точкой
__cpp_hex_float (C++17) 201603L P0245R1 if consteval
__cpp_if_consteval (C++23) 202106L P1938R3 if constexpr
__cpp_if_constexpr (C++17) 201606L P0292R2 Корутины
__cpp_impl_coroutine (поддержка компилятора) (C++20) 201902L P0912R5 LWG3393
Удаление взаимной исключительности для
функций возврата promise корутины(C++29) 202606L (DR20)
P3950R1
Уничтожающий
__cpp_impl_destroying_delete operator delete (поддержка компилятора) (C++20) 201806L P0722R3 Рефлексия
__cpp_impl_reflection (C++26) 202506L P2996R13 P3096R12
P3293R3
P3394R4
P3795R2
Трёхстороннее сравнение
__cpp_impl_three_way_comparison (поддержка компилятора) (C++20) 201907L P0515R3 P0768R1
P1185R2
P1630R1
Упрощённый
__cpp_implicit_move неявный перенос(C++23) 202207L P2266R3 Наследование конструкторов
__cpp_inheriting_constructors (C++11) 200802L N2540 Новая спецификация для
наследуемых конструкторов(C++17) 201511L (DR11)
P0136R1
Инициализирующий захват лямбды
__cpp_init_captures (C++14) 201304L N3648 Разрешить развёртывание пакета в
лямбда-инициализирующем захвате (C++20) 201803L P0780R2 Списочная инициализация
__cpp_initializer_lists и std::initializer_list(C++11) 200806L N2672 Встраиваемые переменные
__cpp_inline_variables (C++17) 201606L P0386R2 Лямбда-выражения
__cpp_lambdas (C++11) 200907L N2927 Модули
__cpp_modules (C++20) 201907L P1103R3 P1811R0
Многомерный
__cpp_multidimensional_subscript оператор индексации(C++23) 202110L P2128R6 Статический
operator[]P2589R1 202211L Именованные
__cpp_named_character_escapes универсальные escape-последовательности символов(C++23) 202207L P2071R2 Атрибуты для
__cpp_namespace_attributes пространств имён(C++17) 201411L N4266 Сделать
__cpp_noexcept_function_type спецификации исключений частью системы типов (C++17) 201510L P0012R1 Разрешить константное вычисление для всех
__cpp_nontype_template_args не-типовых аргументов шаблона(C++17) 201411L N4268 Типы классов и типы с плавающей точкой в
не-типовых параметрах шаблона(C++20) 201911L P1907R1 Объявление
__cpp_nontype_template_parameter_auto не-типового параметра шаблона с (C++17)auto 201606L P0127R2 Инициализаторы нестатических членов данных
__cpp_nsdmi (C++11) 200809L N2756 Индексация пакета
__cpp_pack_indexing (C++26) 202311L P2662R3 Индексация пакета
для шаблонов (C++29) 202606L P3670R4 Удобное заполнительное место без имени
__cpp_placeholder_variables (C++26) 202306L P2169R4 #embed
__cpp_pp_embed (C++26) 202502L P1967R14 параметр смещения
#embed(C++29) 202606L P3540R3 Цикл
__cpp_range_based_for for по диапазонуfor(C++11) 200907L N2930 Цикл
for по диапазонуfor с разными типами /begin end(C++17) 201603L P0184R0 Продление времени жизни в цикле по диапазону
(C++23)for 202211L P2644R1 P2718R0
CWG2659
Сырые строковые литералы
__cpp_raw_strings (C++11) 200710L N2442 ref-квалификаторы
__cpp_ref_qualifiers (C++11) 200710L N2439 Вывод типа возврата для обычных функций
__cpp_return_type_deduction (C++14) 201304L N3638 Ссылка на rvalue
__cpp_rvalue_references (C++11) 200610L N2118 Буквенные суффиксы для
__cpp_size_t_suffix и его версии со знакомstd::size_t(C++23) 202011L P0330R8 Распределение с указанием размера
__cpp_sized_deallocation (C++14) 201309L N3778 static_assert
__cpp_static_assert (C++11) 200410L N1720 Одноаргументный
(C++17)static_assert 201411L N3928 Пользовательские
сообщенияstatic_assert(C++26) 202306L P2741R3 Статический
__cpp_static_call_operator operator()(C++23) 202207L P1169R4 Структурные привязки
__cpp_structured_bindings (C++17) 201606L P0217R3 Атрибуты
для структурной привязки(C++26) 202403L P0609R3 Объявление структурной привязки
как условие P0963R3 202406L Структурные привязки
могут вводить пакетP1061R10 202411L Параметры-шаблоны концепций и переменных-шаблонов
__cpp_template_parameters (C++26) 202502L P2841R7 Сопоставление
__cpp_template_template_args аргументов шаблонов шаблонов(C++17) 201611L P0522R0 Динамическая инициализация и уничтожение с параллелизмом
__cpp_threadsafe_static_init (C++11) 200806L N2660 Тривиальные объединения
__cpp_trivial_union (C++26) 202603L P3074R7 P3726R2
Новые типы символов
__cpp_unicode_characters ( и char16_t) char32_t(C++11) 200704L N2249 Строковые литералы Unicode
__cpp_unicode_literals (C++11) 200710L N2442 Пользовательские литералы
__cpp_user_defined_literals (C++11) 200809L N2765 using enum
__cpp_using_enum (C++20) 201907L P1099R5 Переменные-шаблоны
__cpp_variable_templates (C++14) 201304L N3651 Вариадические
__cpp_variadic_friend объявления friend(C++26) 202403L P2893R3 Вариадические шаблоны
__cpp_variadic_templates (C++11) 200704L N2242 Развёртывание пакетов в
__cpp_variadic_using -объявленияхusing(C++17) 201611L P0195R2 Общее количество макросов: 78
Возможности библиотеки

Следующие макросы могут использоваться для обнаружения, реализована ли возможность стандартной библиотеки текущей реализацией. В отличие от макросов проверки возможностей языка, они не являются предопределёнными. Вместо этого они предоставляются заголовком

version<. >Для каждого макроса проверки возможностей библиотеки он также предоставляется заголовками, которые предоставляют соответствующие компоненты стандартной библиотеки. См.

макросы проверки возможностей библиотеки для полного списка заголовков, предоставляющих эти макросы. Каждый макрос раскрывается в целочисленный литерал, соответствующий году и месяцу, когда соответствующая возможность была включена в рабочий проект. Когда возможность существенно меняется, макрос обновляется соответствующим образом.

Имя макроса

Возможность Значение Стандарт Документ(ы) Конструкторы с парой итераторов для
__cpp_lib_adaptor_iterator_pair_constructor std::stack и std::queue(C++23) 202106L P1425R4 Constexpr
__cpp_lib_addressof_constexpr std::addressof(C++17) 201603L LWG2296 Включение
__cpp_lib_algorithm_default_value_type списочной инициализации для алгоритмов(C++26) 202403L 202603L P2248R8 P3217R0
P3787R2
Итераторы диапазонов как входные данные для алгоритмов, не основанных на
__cpp_lib_algorithm_iterator_requirements диапазонах(C++23) 202207L P2408R5 std::aligned_accessor
__cpp_lib_aligned_accessor : std::mdspan accessor, выражающий сверхвыравнивание указателя (C++26) 202411L P2897R7 Обратная связь по размеру в интерфейсе аллокатора, например:
__cpp_lib_allocate_at_least std::allocator::allocate_at_least, std::allocator_traits::allocate_at_least(C++23) 202302L P0401R6 P2652R2
LWG3887
std::allocator_traits::is_always_equal
__cpp_lib_allocator_traits_is_always_equal , чистка noexcept(C++17) 201411L N4258 std::any
__cpp_lib_any (C++17) 201606L P0220R1 P0032R3
std::apply
__cpp_lib_apply (C++17) 201603L P0220R1 Изменения
std::apply: std::apply_result, std::is_applicable и std::is_nothrow_applicable 202506L (C++26) P1317R2
__cpp_lib_array_constexpr Constexpr для std::reverse_iterator, std::move_iterator, std::array и доступа к диапазону 201603L (C++17) P0031R0
ConstexprIterator; сравнение constexpr для std::array; прочие constexpr bits (std::array::fill и др.) 201811L (C++20) P0858R0
LWG3257
P1023R0
P1032R1
__cpp_lib_as_const std::as_const 201510L (C++17) P0007R1
__cpp_lib_associative_heterogeneous_erasure Гетерогенное удаление в ассоциативных контейнерах и неупорядоченных ассоциативных контейнерах 202110L (C++23) P2077R3
__cpp_lib_associative_heterogeneous_insertion Гетерогенные перегрузки для оставшихся функций-членов в упорядоченных и неупорядоченных ассоциативных контейнерах 202306L (C++26) P2363R5
__cpp_lib_assume_aligned std::assume_aligned 201811L (C++20) P1007R3
__cpp_lib_atomic_flag_test std::atomic_flag::test 201907L (C++20) P1135R6
__cpp_lib_atomic_float Атомарные с плавающей точкой 201711L (C++20) P0020R6
__cpp_lib_atomic_is_always_lock_free Constexpr std::atomic<T>::is_always_lock_free 201603L (C++17) P0152R1
__cpp_lib_atomic_lock_free_type_aliases Атомарные целочисленные типы без блокировок (std::atomic_signed_lock_free, std::atomic_unsigned_lock_free) 201907L (C++20) P1135R6
__cpp_lib_atomic_min_max Атомарные минимум/максимум (std::atomic::fetch_min, std::atomic::fetch_max и т. д.) 202403L (C++26) P0493R5
Атомарные минимум/максимум с плавающей точкой 202506L P3008R6
__cpp_lib_atomic_reductions Атомарные операции редукции 202506L (C++26) P3111R8
__cpp_lib_atomic_ref std::atomic_ref 201806L (C++20) P0019R8
std::atomic_ref::address() 202603L (C++26) P2835R7
P3936R1
__cpp_lib_atomic_shared_ptr std::atomic<std::shared_ptr> 201711L (C++20) P0718R2
__cpp_lib_atomic_value_initialization Исправление атомарной инициализации (инициализация значением std::atomic по умолчанию) 201911L (C++20) P0883R2
__cpp_lib_atomic_wait Эффективное ожидание std::atomic 201907L (C++20) P1135R6
__cpp_lib_barrier std::barrier 201907L (C++20) P1135R6
Гарантии завершения фазы std::barrier 202302L (C++23) P2588R3
__cpp_lib_bind_back std::bind_back 202202L (C++23) P2387R3
Разрешение передачи вызываемых объектов в качестве не-типовых аргументов шаблона в std::bind_back 202306L (C++26) P2714R1
__cpp_lib_bind_front std::bind_front 201907L (C++20) P0356R5
P1651R0
Разрешение передачи вызываемых объектов в качестве не-типовых аргументов шаблона в std::bind_front 202306L (C++26) P2714R1
__cpp_lib_bit_cast std::bit_cast 201806L (C++20) P0476R2
__cpp_lib_bitops Битовые операции 201907L (C++20) P0553R4
<bit>: перестановки битов, std::shl и std::shr 202606L (C++29) P3104R6
P3793R2
__cpp_lib_bitset Взаимодействие std::bitset с std::string_view 202306L (C++26) P2697R1
__cpp_lib_bool_constant std::bool_constant 201505L (C++17) N4389
__cpp_lib_bounded_array_traits std::is_bounded_array, std::is_unbounded_array 201902L (C++20) P1357R1
__cpp_lib_boyer_moore_searcher Поисковики 201603L (C++17) P0220R1
__cpp_lib_byte std::byte 201603L (C++17) P0298R3
__cpp_lib_byteswap std::byteswap 202110L (C++23) P1272R4
__cpp_lib_char8_t Библиотечная поддержка для char8_t 201907L (C++20) P0482R6
P1423R3
__cpp_lib_chrono Функции округления для std::chrono::duration и std::chrono::time_point 201510L (C++17) P0092R1
Constexpr для всех функций-членов std::chrono::duration и std::chrono::time_point 201611L P0505R0
Календари и Часовые пояса 201907L (C++20) P0355R7
P1466R3
Поддержка хеширования для классов значений std::chrono 202306L (C++26)
__cpp_lib_chrono_udls P2592R3 201304L Пользовательские литералы для временных типов (C++14)
__cpp_lib_clamp N3642 201603L std::clamp (C++17)
__cpp_lib_common_reference P0025R1Сделать std::common_reference_t от std::reference_wrapper 202302L ссылочным типом (C++23)
__cpp_lib_common_reference_wrapper P2655R3Сделать std::common_reference_t от std::reference_wrapper 202302L ссылочным типом (C++23)
__cpp_lib_complex_udls P2655R3std::complex 201309L Пользовательские литералы для (C++14)
__cpp_lib_concepts N3779 202002L Концепции стандартной библиотеки (C++20)
P0898R3
P1754R1
P1964R2Типы только для перемещения для equality_comparable_with, totally_ordered_with и 202207L three_way_comparable_with (C++23)
__cpp_lib_constant_wrapper P2404R3 202603L std::constant_wrapper (C++26)
P2781R9
P3978R3Отмена поддержки строковых литералов в 202606L std::constant_wrapper
(C++29)
(DR26)
__cpp_lib_constexpr_algorithms P4206R0Constexpr для 201806L алгоритмов (C++20)
P0202R3
P0879R0
LWG3256
LWG3792 202306L Constexpr устойчивая сортировка (C++26)
__cpp_lib_constexpr_atomic P2562R1Constexpr std::atomic и 202411L std::atomic_ref (C++26)
__cpp_lib_constexpr_bitset P3309R3Более constexpr 202207L std::bitset (C++23)
__cpp_lib_constexpr_charconv P2417R2Constexpr для std::to_chars и std::from_chars 202207L для целочисленных типов (C++23)
__cpp_lib_constexpr_cmath P2291R3<Constexpr для математических функций в >cmath< и > 202202L cstdlib (C++23)
P0533R9<Больше constexpr для > 202306L cmath (C++26)
__cpp_lib_constexpr_complex P1383R2Constexpr для 201711L std::complex (C++20)
P0415R1<Больше constexpr для > 202306L complex (C++26)
__cpp_lib_constexpr_deque P1383R2Constexpr 202502L std::deque (C++26)
__cpp_lib_constexpr_dynamic_alloc P3372R3Constexpr для std::allocator 201907L и связанных утилит (C++20)
__cpp_lib_constexpr_exceptions P0784R7Constexpr для типов исключений, например std::bad_alloc, std::bad_cast 202411L и т.д. (C++26)
P3068R6 202502L Constexpr для дополнительных типов исключений
__cpp_lib_constexpr_flat_map P3378R2Constexpr std::flat_map и 202502L std::flat_multimap (C++26)
__cpp_lib_constexpr_flat_set P3372R3Constexpr std::flat_set и 202502L std::flat_multiset (C++26)
__cpp_lib_constexpr_format P3372R3 202511L Constexpr текстовое форматирование (C++26)
__cpp_lib_constexpr_forward_list P3391R2Constexpr 202502L std::forward_list (C++26)
__cpp_lib_constexpr_functional P3372R3Прочие constexpr bits (std::default_searcherINVOKE 201907L ); constexpr (C++20)
P1032R1
__cpp_lib_constexpr_inplace_vector P1065R2Constexpr std::inplace_vector 202502L для нетривиальных типов (C++26)
__cpp_lib_constexpr_iterator P3074R7Прочие constexpr bits (std::insert_iterator 201811L и др.) (C++20)
__cpp_lib_constexpr_list P1032R1Constexpr 202502L std::list (C++26)
__cpp_lib_constexpr_map P3372R3Constexpr std::map и 202502L std::multimap (C++26)
__cpp_lib_constexpr_memory P3372R3Constexpr в 201811L std::pointer_traits (C++20)
P1006R1Constexpr 202202L std::unique_ptr (C++23)
P2273R3Constexpr std::shared_ptr 202506L и друзья (C++26)
__cpp_lib_constexpr_new P3037R6Constexpr new 202406L placement (C++26)
__cpp_lib_constexpr_numeric P2747R2Constexpr для алгоритмов< в > 201911L numeric (C++20)
__cpp_lib_constexpr_queue P1645R1Constexpr std::queue и 202502L std::priority_queue (C++26)
__cpp_lib_constexpr_set P3372R3Constexpr std::set и 202502L std::multiset (C++26)
__cpp_lib_constexpr_stack P3372R3Constexpr 202502L std::stack (C++26)
__cpp_lib_constexpr_string P3372R3Больше constexpr 201611L std::char_traits (C++17)
P0426R1Полностью constexpr 201811L std::char_traits (C++20)
P1032R1Constexpr 201907L std::string
__cpp_lib_constexpr_string_view P0980R1Прочие constexpr bits (std::string_view::copy 201811L ) (C++20)
__cpp_lib_constexpr_tuple P1032R1Прочие constexpr bits (std::tuple::operator= 201811L и др.) (C++20)
__cpp_lib_constexpr_typeinfo P1032R1Constexpr для 202106L std::type_info::operator== (C++23)
__cpp_lib_constexpr_unordered_map P1328R1Constexpr std::unordered_map и 202502L std::unordered_multimap (C++26)
__cpp_lib_constexpr_unordered_set P3372R3Constexpr std::unordered_set и 202502L std::unordered_multiset (C++26)
__cpp_lib_constexpr_utility P3372R3Прочие constexpr bits (std::pair::operator= 201811L и др.) (C++20)
__cpp_lib_constexpr_vector P1032R1Constexpr для 201907L std::vector (C++20)
__cpp_lib_constrained_equality P1004R2Ограниченные операторы отношений для std::pair, std::tuple, std::optional и 202403L std::variant (C++26)
P2944R3Ограничение std::expected 202411L операторов равенства
__cpp_lib_containers_ranges P3379R0Осведомлённое о диапазонах 202202L конструирование и вставка для контейнеров и строк (C++23)
__cpp_lib_contracts <P1206R7>contracts 202502L : Поддержка контрактов (C++26)
__cpp_lib_copyable_function P2900R14 202306L std::copyable_function (C++26)
__cpp_lib_coroutine P2548R6Корутины 201902L (поддержка библиотеки) (C++20)
P0912R5
__cpp_lib_counting_scope LWG3393 202506L Асинхронные области: создание областей для не-последовательного параллелизма (C++26)
P3149R11
__cpp_lib_debugging <P3815R1>debugging: 202311L Поддержка отладки (C++26)
P2546R5Заменяемый 202403L std::is_debugger_present
__cpp_lib_define_static P2810R4std::define_static_object, std::define_static_array, 202506L std::define_static_string (C++26)
__cpp_lib_destroying_delete P3491R3Уничтожающий operator delete 201806L (поддержка библиотеки) (C++20)
__cpp_lib_enable_shared_from_this P0722R3 201603L std::enable_shared_from_this::weak_from_this (C++17)
__cpp_lib_endian P0033R1 201907L std::endian (C++20)
P0463R1
__cpp_lib_erase_if P1612R1 202002L Единообразное удаление из контейнеров (C++20)
P1209R0
__cpp_lib_exception_ptr_cast P1115R3 202603L std::exception_ptr_cast() (C++26)
P2927R3
P3748R0
__cpp_lib_exchange_function P3981R2 201304L std::exchange (C++14)
__cpp_lib_execution N3668 201603L Политики выполнения (C++17)
P0024R2 201902L std::execution::unsequenced_policy (C++20)
__cpp_lib_expected P1001R2шаблон класса 202202L std::expected (C++23)
P0323R12Монадические функции для 202211L std::expected
P2505R5 202606L std::expected::has_error() (C++29)
__cpp_lib_filesystem P3798R1 201703L Библиотека файловой системы (C++17)
P0218R1
P0219R1
P0392R0
__cpp_lib_flat_map P0317R1std::flat_map и 202207L std::flat_multimap (C++23)
P0429R9std::flat_map и std::flat_multimap 202511L исправления (C++26)
__cpp_lib_flat_set P3567R2std::flat_set и 202207L std::flat_multiset (C++23)
P1222R4
LWG3751std::flat_set и std::flat_multiset 202511L исправления (C++26)
__cpp_lib_format P3567R2 201907L Текстовое форматирование (C++20)
P0645R10
P1361R2
P1652R1Проверки строки формата на этапе компиляции; Уменьшение параметризации 202106L std::vformat_to
(C++23)
(DR20)
P2216R3 202110L Исправление обработки локали в форматтерах chrono; Поддержка неконстантно-форматируемых типов
P2372R3
P2418R2Раскрытие std::basic_format_string 202207L ; уточнение обработки кодировок в локализованном форматировании chrono-типов (C++23)
P2419R2
P2508R1 202304L Форматирование указателей (C++26)
P2510R3 202305L Проверка типов аргументов формата
P2757R3Членский 202306L visit
P2637R3 202311L Строки формата времени выполнения
P2918R2std::runtime_formatПереименование в 202603L std::dynamic_format
__cpp_lib_format_path P2918R2Форматирование 202403L std::filesystem::path (C++26)
P2845R8std::filesystem::path::display_string() и 202506L std::filesystem::path::native_encoded_string()
__cpp_lib_format_ranges P2319R5 202207L Форматирование диапазонов (C++23)
P2286R8
P2585R1
__cpp_lib_format_uchar LWG3750 202311L Исправление форматирования кодовых единиц как целых чисел (C++26)
__cpp_lib_formatters P2909R4Форматирование std::thread::id и 202302L std::stacktrace (C++23)
__cpp_lib_forward_like P2693R1 202207L std::forward_like (C++23)
__cpp_lib_freestanding_algorithm P2445R1<Автономные средства в > 202311L algorithm (C++26)
P2407R5<Автономная библиотека: > 202502L algorithm
__cpp_lib_freestanding_array P2976R1Сделать части std::array 202311L автономными (C++26)
__cpp_lib_freestanding_char_traits P2407R5Автономный 202306L std::char_traits (C++26)
__cpp_lib_freestanding_charconv P2338R4<Автономные средства в > 202306L charconv (C++26)
__cpp_lib_freestanding_cstdlib P2338R4<Автономные средства в > 202306L cstdlib (C++26)
__cpp_lib_freestanding_cstring P2338R4<Автономные средства в > 202306L cstring (C++26)
P2338R4Удаление std::strtok 202311L из автономных средств
__cpp_lib_freestanding_cwchar P2937R0<Автономные средства в > 202306L cwchar (C++26)
__cpp_lib_freestanding_errc P2338R4Автономный 202306L std::errc (C++26)
__cpp_lib_freestanding_execution P2338R4<Автономная библиотека: > 202502L execution (C++26)
__cpp_lib_freestanding_expected P2976R1Сделать части std::expected 202311L автономными (C++26)
__cpp_lib_freestanding_feature_test_macros P2833R2 202306L Поддержка автономных макросов проверки возможностей (C++26)
__cpp_lib_freestanding_functional P2198R7<Автономные средства в > 202306L functional (C++26)
__cpp_lib_freestanding_iterator P2198R7<Автономные средства в > 202306L iterator (C++26)
__cpp_lib_freestanding_mdspan P2198R7Автономный 202311L std::mdspan (C++26)
__cpp_lib_freestanding_memory P2833R2<Автономные средства в > 202306L memory (C++26)
P2198R7<Автономная библиотека: > 202502L memory
__cpp_lib_freestanding_numeric P2976R1<Автономные средства в >numeric 202311L (арифметика с насыщением) (C++26)
P0543R3<Автономная библиотека: > 202502L numeric
__cpp_lib_freestanding_operator_new P2976R1Определение operator new 202306L (необязательно в автономных реализациях) (C++26)
__cpp_lib_freestanding_optional P2198R7Сделать части std::optional 202311L автономными (C++26)
P2407R5Автономный <std::optional&> 202506L T
__cpp_lib_freestanding_random P3836R2<Автономная библиотека: > 202502L random (C++26)
__cpp_lib_freestanding_ranges P2976R1<Автономные средства в > 202306L ranges (C++26)
__cpp_lib_freestanding_ratio P2198R7<Автономные средства в > 202306L ratio (C++26)
__cpp_lib_freestanding_string_view P2198R7Сделать части std::string_view 202311L автономными (C++26)
__cpp_lib_freestanding_tuple P2407R5<Автономные средства в > 202306L tuple (C++26)
__cpp_lib_freestanding_utility P2198R7<Автономные средства в > 202306L utility (C++26)
__cpp_lib_freestanding_variant P2198R7Сделать части std::variant 202311L автономными (C++26)
__cpp_lib_fstream_native_handle P2407R5 202306L Получение собственных дескрипторов из файловых потоков (C++26)
__cpp_lib_function_ref P1759R6std::function_ref 202306L : Ссылка на вызываемый объект с стиранием типа (C++26)
__cpp_lib_gcd_lcm P0792R14std::gcd, 201606L std::lcm (C++17)
__cpp_lib_generator P0295R0std::generator 202207L : Синхронный генератор корутин для диапазонов (C++23)
__cpp_lib_generic_associative_lookup P2502R2Гетерогенный поиск сравнения в 201304L ассоциативных контейнерах (C++14)
__cpp_lib_generic_unordered_lookup N3657Гетерогенный поиск сравнения в 201811L неупорядоченных ассоциативных контейнерах (C++20)
__cpp_lib_hardware_interference_size P0919R3 201703L std::hardware_{constructive, destructive}_interference_size (C++17)
__cpp_lib_has_unique_object_representations P0154R1 201606L std::has_unique_object_representations (C++17)
__cpp_lib_hazard_pointer <P0258R2>hazard_pointer 202306L : Указатели опасности (C++26)
P2530R3 202606L Пакетные указатели опасности (C++29)
__cpp_lib_hive <P3428R4>hive 202502L : контейнер на основе корзин, повторно использующий память удалённых элементов (C++26)
__cpp_lib_hypot P0447R28Перегрузка с 3 аргументами 201603L std::hypot (C++17)
__cpp_lib_incomplete_container_elements P0030R1Минимальная поддержка неполных типов для std::forward_list, std::list и 201505L std::vector (C++17)
__cpp_lib_indirect N4510 202502L std::indirect (C++26)
__cpp_lib_initializer_list P3019R14beginУстранение несоответствий в end/ для 202511L std::initializer_list
(C++26)
(DR11)
__cpp_lib_inplace_vector P3016R6std::inplace_vector 202406L : Вектор с фиксированной ёмкостью, динамически изменяющий размер (C++26)
P0843R14try_append_rangeУлучшенные возвращаемые типы. Удалена 202603L функция-член
P3981R2
__cpp_lib_int_pow2 P4022R0Операции со степенью двойки для целых чисел (std::has_single_bit, std::bit_ceil, std::bit_floor, std::bit_width) 202002L (C++20) P0556R3
P1956R1
__cpp_lib_integer_comparison_functions Функции сравнения целых чисел 202002L (C++20) P0586R2
__cpp_lib_integer_sequence Целочисленные последовательности времени компиляции 201304L (C++14) N3658
Сделать std::integer_sequence используемым в структурных привязках и операторах развёртывания 202511L (C++26) P1789R3
__cpp_lib_integral_constant_callable std::integral_constant 201304L (C++14) N3545
__cpp_lib_interpolate std::lerp, std::midpoint 201902L (C++20) P0811R3
__cpp_lib_invoke std::invoke 201411L (C++17) N4169
__cpp_lib_invoke_r std::invoke_r 202106L (C++23) P2136R3
__cpp_lib_ios_noreplace Поддержка эксклюзивного режима для fstream 202207L (C++23) P2467R1
__cpp_lib_is_aggregate std::is_aggregate 201703L (C++17) LWG2911
__cpp_lib_is_constant_evaluated std::is_constant_evaluated 201811L (C++20) P0595R2
__cpp_lib_is_final std::is_final 201402L (C++14) LWG2112
__cpp_lib_is_implicit_lifetime std::is_implicit_lifetime 202302L (C++23) P2674R1
__cpp_lib_is_invocable std::is_invocable, std::invoke_result 201703L (C++17) P0604R0
__cpp_lib_is_layout_compatible std::is_layout_compatible 201907L (C++20) P0466R5
__cpp_lib_is_nothrow_convertible std::is_nothrow_convertible 201806L (C++20) P0758R1
LWG3356
__cpp_lib_is_null_pointer std::is_null_pointer 201309L (C++14)
(DR11)
LWG2247
__cpp_lib_is_pointer_interconvertible Признаки взаимной преобразуемости указателей: std::is_pointer_interconvertible_with_class, std::is_pointer_interconvertible_base_of 201907L (C++20) P0466R5
__cpp_lib_is_scoped_enum std::is_scoped_enum 202011L (C++23) P1048R1
__cpp_lib_is_structural std::is_structural: признак типа для обнаружения структурных типов 202603L (C++26) P3856R8
__cpp_lib_is_sufficiently_aligned std::is_sufficiently_aligned: проверяет предусловие выравнивания указателя 202411L (C++26) P2897R7
__cpp_lib_is_swappable Признаки (nothrow-)swappable 201603L (C++17) P0185R1
__cpp_lib_is_virtual_base_of std::is_virtual_base_of: Признак типа для обнаружения виртуальных базовых классов 202406L (C++26) P2985R0
__cpp_lib_is_within_lifetime Проверка активности альтернативы объединения (std::is_within_lifetime) 202306L (C++26) P2641R4
Расширение std::is_within_lifetime 202603L P3450R1
__cpp_lib_jthread Токен остановки и присоединяемый поток 201911L (C++20) P0660R10
P1869R1
__cpp_lib_latch std::latch 201907L (C++20) P1135R6
__cpp_lib_launder CWG issue 1776: Замена объектов класса, содержащих ссылочные члены (std::launder) 201606L (C++17) P0137R1
__cpp_lib_linalg Интерфейс свободных функций линейной алгебры на основе BLAS 202311L (C++26) P1673R13
__cpp_lib_list_remove_return_type Изменение возвращаемого типа remove(), remove_if() и unique() для std::forward_list и std::list 201806L (C++20) P0646R1
__cpp_lib_logical_traits Логические операции над признаками типов 201510L (C++17) P0013R1
__cpp_lib_make_from_tuple std::make_from_tuple 201606L (C++17) P0209R2
__cpp_lib_make_reverse_iterator std::make_reverse_iterator 201402L (C++14) LWG2285
__cpp_lib_make_unique std::make_unique 201304L (C++14) N3656
__cpp_lib_map_lookup Улучшенная функция поиска для контейнеров map 202606L (C++29) P3091R6
__cpp_lib_map_try_emplace std::map::try_emplace, std::map::insert_or_assign 201411L (C++17) N4279
__cpp_lib_math_constants Математические константы 201907L (C++20) P0631R8
__cpp_lib_math_special_functions Специальные математические функции 201603L (C++17) P0226R1
__cpp_lib_mdspan std::mdspan 202207L (C++23) P0009R18
P2599R2
P2604R0
P2613R1
std::dims для std::mdspan 202406L (C++26) P2389R2
__cpp_lib_mdspan_copy std::mdspan операции копирования и заполнения 202606L (C++29) P3242R4
__cpp_lib_memory_resource std::pmr::memory_resource 201603L (C++17) P0220R1
__cpp_lib_modules Модули стандартной библиотеки std и std.compat 202207L (C++23) P2465R3
__cpp_lib_move_iterator_concept Сделать std::move_iterator итератором произвольного доступа 202207L (C++23) P2520R0
__cpp_lib_move_only_function std::move_only_function 202110L (C++23) P0288R9
__cpp_lib_node_extract Сращивание карт и множеств (std::map::extract, std::map::merge, insert(node_type) и т.д.) 201606L (C++17) P0083R3
__cpp_lib_nonmember_container_access std::size, std::data и std::empty 201411L (C++17) N4280
__cpp_lib_not_fn std::not_fn 201603L (C++17) P0005R4
Разрешение передачи вызываемых объектов в качестве не-типовых аргументов шаблона в std::not_fn 202306L (C++26) P2714R1
__cpp_lib_null_iterators Пустые LegacyForwardIteratorы 201304L (C++14) N3644
__cpp_lib_observable_checkpoint Библиотечная поддержка наблюдаемых контрольных точек 202506L (C++26) P1494R5
P3641R0
__cpp_lib_optional std::optional 201606L (C++17) P0220R1
P0032R3
P0307R2
Полностью constexpr std::optional 202106L (C++23)
(DR20)
P2231R1
Монадические операции в std::optional 202110L (C++23) P0798R8
LWG3621
std::optional<T&> 202506L (C++26) P2988R12
__cpp_lib_optional_range_support std::optional поддержка диапазонов 202406L (C++26) P3168R2
__cpp_lib_out_ptr std::out_ptr, std::inout_ptr 202106L (C++23) P1132R8
Автономный std::out_ptr, std::inout_ptr 202311L (C++26) P2833R2
__cpp_lib_parallel_algorithm Параллельные алгоритмы 201603L (C++17) P0024R2
Параллельные алгоритмы диапазонов 202506L (C++26) P3179R9
P3709R2
__cpp_lib_parallel_scheduler Параллельный планировщик 202506L (C++26) P2079R10
P3804R2
__cpp_lib_philox_engine std::philox_engine: Генератор случайных чисел на основе счётчика 202406L (C++26) P2075R6
__cpp_lib_pointer_tag_pair Маркировка указателей 202606L (C++29) P3125R6
__cpp_lib_polymorphic std::polymorphic 202502L (C++26) P3019R14
__cpp_lib_polymorphic_allocator std::pmr::polymorphic_allocator как тип-словарь 201902L (C++20) P0339R6
LWG3437
__cpp_lib_print Форматированный вывод 202207L (C++23) P2093R14
Разрешить эффективную реализацию std::print 202403L (C++26)
(DR23)
P3107R5
std::print больше типов быстрее и с меньшим расходом памяти 202406L P3235R3
__cpp_lib_quoted_string_io std::quoted 201304L (C++14) N3654
__cpp_lib_ranges Библиотека диапазонов и ограниченные алгоритмы 201911L (C++20) P0896R4
P1035R7
P1716R3
Не-инициализируемые по умолчанию представления 202106L (C++23)
(DR20)
P2325R3
Представления с владением 202110L P2415R2
std::ranges::range_adaptor_closure 202202L (C++23) P2387R3
Ослабление адаптеров диапазонов для разрешения типов только для перемещения 202207L P2494R2
Удаление перегрузок «отравляющей пилюли» в ranges::begin, ranges::end, ranges::rbegin, ranges::rend и ranges::size 202211L P2602R2
Ослабление диапазонов для разрешения определённых проекций 202302L P2609R3
Удаление требования общего ссылочного типа из косвенно вызываемых концепций 202406L (C++26)
(DR20)
P2997R1
__cpp_lib_ranges_as_const std::const_iterator, std::ranges::as_const_view 202207L (C++23) P2278R4
Сделать std::basic_const_iterator следующим преобразуемости своего базового типа 202311L (C++26) P2836R1
__cpp_lib_ranges_as_input std::ranges::as_input_view 202502L (C++26) P3137R3
P3828R1
__cpp_lib_ranges_as_rvalue std::ranges::as_rvalue_view 202207L (C++23) P2446R2
__cpp_lib_ranges_cache_latest std::ranges::cache_latest_view 202411L (C++26) P3138R5
__cpp_lib_ranges_cartesian_product std::ranges::cartesian_product_view 202207L (C++23) P2374R4
P2540R1
__cpp_lib_ranges_chunk std::ranges::chunk_view 202202L (C++23) P2442R1
__cpp_lib_ranges_chunk_by std::ranges::chunk_by_view 202202L (C++23) P2443R1
__cpp_lib_ranges_concat std::ranges::concat_view 202403L (C++26) P2542R8
__cpp_lib_ranges_contains std::ranges::contains 202207L (C++23) P2302R4
__cpp_lib_ranges_enumerate std::ranges::enumerate_view 202302L (C++23) P2164R9
__cpp_lib_ranges_filter Расширения представления фильтра для более безопасного использования 202603L (C++26)
(DR20)
P3725R3
__cpp_lib_ranges_find_last std::ranges::find_last, std::ranges::find_last_if и std::ranges::find_last_if_not 202207L (C++23) P1223R5
LWG3807
__cpp_lib_ranges_fold std::ranges Алгоритмы свёртки (fold) 202207L (C++23) P2322R6
__cpp_lib_ranges_generate_random Векторный API для генерации случайных чисел (std::ranges::generate_random) 202403L (C++26) P1068R11
__cpp_lib_ranges_indices std::views::indices 202506L (C++26) P3060R3
__cpp_lib_ranges_iota std::ranges::iota 202202L (C++23) P2440R1
__cpp_lib_ranges_join_with std::ranges::join_with_view 202202L (C++23) P2441R2
__cpp_lib_ranges_repeat std::ranges::repeat_view 202207L (C++23) P2474R2
__cpp_lib_ranges_reserve_hint std::ranges::approximately_sized_range и std::ranges::reserve_hint 202502L (C++26) P2846R6
__cpp_lib_ranges_slide std::ranges::slide_view 202202L (C++23) P2442R1
__cpp_lib_ranges_starts_ends_with std::ranges::starts_with, std::ranges::ends_with 202106L (C++23) P1659R3
__cpp_lib_ranges_stride std::ranges::stride_view 202207L (C++23) P1899R3
__cpp_lib_ranges_to_container std::ranges::to 202202L (C++23) P1206R7
__cpp_lib_ranges_zip std::ranges::zip_view, std::ranges::zip_transform_view, std::ranges::adjacent_view, std::ranges::adjacent_transform_view 202110L (C++23) P2321R2
__cpp_lib_ratio Добавление новых префиксов СИ 2022 года 202306L (C++26) P2734R0
__cpp_lib_raw_memory_algorithms Расширение инструментов управления памятью 201606L (C++17) P0040R3
Constexpr для специализированных алгоритмов работы с памятью 202411L (C++26) P3369R0
P3508R0
__cpp_lib_rcu <rcu>: Read-Copy Update (RCU) 202306L (C++26) P2545R4
__cpp_lib_reference_from_temporary std::reference_constructs_from_temporary и std::reference_converts_from_temporary 202202L (C++23) P2255R2
__cpp_lib_reference_wrapper Сравнения для std::reference_wrapper 202403L (C++26) P2944R3
__cpp_lib_reflection <meta>: Рефлексия 202506L (C++26) P2996R13
P3394R4
P3293R3
P3096R12
P3560R2
P3795R2
P4156R0
__cpp_lib_remove_cvref std::remove_cvref 201711L (C++20) P0550R2
__cpp_lib_replaceable_contract_violation_handler Поддержка заменяемого обработчика нарушения контракта, определяемая реализацией 202603L (C++26) P3886R0
__cpp_lib_result_of_sfinae std::result_of и SFINAE 201210L (C++14) N3462
__cpp_lib_robust_nonmodifying_seq_ops Повышение надёжности немодифицирующих последовательных операций (перегрузки с двумя диапазонами для std::mismatch, std::equal и std::is_permutation) 201304L (C++14) N3671
__cpp_lib_sample std::sample 201603L (C++17) P0220R1
__cpp_lib_saturation_arithmetic Арифметика с насыщением 202311L (C++26) P0543R3
Переименование функций арифметики с насыщением 202603L (C++26) P4052R0
__cpp_lib_scoped_lock std::scoped_lock 201703L (C++17) P0156R2
__cpp_lib_semaphore std::counting_semaphore, std::binary_semaphore 201907L (C++20) P1135R6
__cpp_lib_senders std::execution: модель отправитель-получатель для управления выполнением 202406L (C++26) P2300R10
std::execution: Дополнительные расширения 202506L P3388R3
P3396R1
P3433R1
P3481R5
P3570R2
P3682R0
P3887R1
__cpp_lib_shared_mutex std::shared_mutex (без тайм-аута) 201505L (C++17) N4508
__cpp_lib_shared_ptr_arrays std::shared_ptr 201611L (C++17) P0497R0
Поддержка массивов в std::make_shared 201707L (C++20) P0674R1
__cpp_lib_shared_ptr_weak_type shared_ptr::weak_type 201606L (C++17) P0163R0
__cpp_lib_shared_timed_mutex std::shared_timed_mutex 201402L (C++14) N3891
__cpp_lib_shift std::shift_left и std::shift_right 201806L (C++20) P0769R2
std::ranges::shift_left и std::ranges::shift_right 202202L (C++23) P2440R1
__cpp_lib_simd <simd>: Параллельные типы данных 202411L (C++26) P1928R15
std::simd::iota 202606L (C++29) P3319R6
__cpp_lib_simd_bitops <simd>: перестановки битов, std::simd::shl и std::simd::shr 202606L (C++29) P3772R2
P3793R2
__cpp_lib_simd_complex Поддержка чередующихся значений std::complex в std::simd 202502L (C++26) P2663R7
__cpp_lib_simd_permutations Операции перестановки в SIMD 202506L (C++26) P2664R11
__cpp_lib_smart_ptr_for_overwrite Создание умных указателей с инициализацией по умолчанию (std::allocate_shared_for_overwrite, std::make_shared_for_overwrite, std::make_unique_for_overwrite) 202002L (C++20) P1020R1
P1973R1
__cpp_lib_smart_ptr_owner_equality Включение использования std::weak_ptr в качестве ключей в неупорядоченных ассоциативных контейнерах 202306L (C++26) P1901R2
__cpp_lib_source_location Захват информации об исходном коде (std::source_location) 201907L (C++20) P1208R6
__cpp_lib_span std::span 202002L (C++20) P0122R7
LWG3274
P1024R3
P1976R2
Сделать части std::span автономными 202311L (C++26) P2821R5
P2833R2
__cpp_lib_spanstream std::spanbuf, std::spanstream 202106L (C++23) P0448R4
__cpp_lib_ssize std::ssize и беззнаковый std::span::size 201902L (C++20) P1227R2
__cpp_lib_sstream_from_string_view Взаимодействие std::stringstream с std::string_view 202306L (C++26) P2495R3
__cpp_lib_stacktrace Библиотека трассировки стека 202011L (C++23) P0881R7
__cpp_lib_start_lifetime std::start_lifetime 202603L (C++26) P3726R2
__cpp_lib_start_lifetime_as Явное управление временем жизни (std::start_lifetime_as) 202207L (C++23) P2590R2
__cpp_lib_starts_ends_with Проверка префикса и суффикса строк (starts_with() и ends_with() для std::string и std::string_view) 201711L (C++20) P0457R2
__cpp_lib_stdatomic_h Заголовок совместимости <stdatomic.h> для атомарных операций C 202011L (C++23) P0943R6
__cpp_lib_stdbit_h Заголовок совместимости <stdbit.h> для побитовых операций C 202603L (C++26) P3370R1
__cpp_lib_stdckdint_h Заголовок совместимости <stdckdint.h> для проверенных целочисленных операций C 202603L (C++26) P3370R1
__cpp_lib_string_contains contains() для std::basic_string и std::basic_string_view 202011L (C++23) P1679R3
__cpp_lib_string_resize_and_overwrite std::basic_string::resize_and_overwrite 202110L (C++23) P1072R10
__cpp_lib_string_subview std::string::subview() и std::string_view::subview() 202506L (C++26) P3044R2
__cpp_lib_string_udls Пользовательские литералы для строковых типов 201304L (C++14) N3642
__cpp_lib_string_view std::string_view 201606L (C++17) P0220R1
P0254R2
ConstexprIterator 201803L (C++20) P0858R0
LWG3257
Конкатенация std::string и std::string_view 202403L (C++26) P2591R5
__cpp_lib_submdspan std::submdspan 202306L (C++26) P2630R4
Расширенные макеты mdspan 202403L P2642R6
__cpp_lib_syncbuf Синхронизированный буферизованный ostream (std::syncbuf, std::osyncstream) и манипуляторы 201803L (C++20) P0053R7
P0753R2
__cpp_lib_task Типы задач корутин 202506L (C++26) P3552R3
P3980R1
P3927R2
P3941R4
P4151R1
__cpp_lib_text_encoding std::text_encoding 202306L (C++26) P1885R12
__cpp_lib_thread_attributes Атрибуты потока 202606L (C++29) P2019R9
__cpp_lib_three_way_comparison Трёхстороннее сравнение (поддержка библиотеки); добавление трёхстороннего сравнения в библиотеку 201907L (C++20) P0768R1
P1614R2
__cpp_lib_to_address Утилита для преобразования указателя в сырой указатель (std::to_address) 201711L (C++20) P0653R2
__cpp_lib_to_array std::to_array 201907L (C++20) P0325R4
__cpp_lib_to_chars Элементарные строковые преобразования (std::to_chars, std::from_chars) 201611L (C++17) P0067R5
P0682R1
LWG3137
Проверка успеха или неудачи функций <charconv> 202306L (C++26) P2497R0
Исправление представления чисел с плавающей точкой по умолчанию в std::to_chars 202606L (C++29) P3505R4
__cpp_lib_to_string Переопределение std::to_string через std::format 202306L (C++26) P2587R3
__cpp_lib_to_underlying std::to_underlying 202102L (C++23) P1682R3
__cpp_lib_transformation_trait_aliases Псевдонимы шаблонов для признаков преобразования 201304L (C++14) N3655
__cpp_lib_transparent_operators Прозрачные операторные функторы (std::less<> и др.) 201210L (C++14) N3421
Прозрачный std::owner_less (std::owner_less<void>) 201510L (C++17) P0074R0
__cpp_lib_tuple_element_t std::tuple_element_t 201402L (C++14) N3887
__cpp_lib_tuple_like Совместимость между std::tuple и кортежеподобными объектами (std::pair, std::array, std::subrange) 202207L (C++23) P2165R4
Добавить протокол кортежа в std::complex 202311L (C++26) P2819R2
__cpp_lib_tuples_by_type Обращение к кортежам по типу 201304L (C++14) N3670
__cpp_lib_type_identity std::type_identity 201806L (C++20) P0887R1
__cpp_lib_type_order Стандартизированное упорядочивание constexpr типов 202506L (C++26) P2830R10
P3778R0
P4140R0
__cpp_lib_type_trait_variable_templates Переменные-шаблоны признаков типов (std::is_void_v и т.д.) 201510L (C++17) P0006R0
__cpp_lib_uncaught_exceptions std::uncaught_exceptions 201411L (C++17) N4259
__cpp_lib_unordered_map_try_emplace std::unordered_map::try_emplace, std::unordered_map::insert_or_assign 201411L (C++17) N4279
__cpp_lib_unreachable std::unreachable 202202L (C++23) P0627R6
__cpp_lib_unwrap_ref std::unwrap_ref_decay и std::unwrap_reference 201811L (C++20) P0318R1
LWG3348
__cpp_lib_valarray Устранение несоответствий в begin/end для std::valarray 202511L (C++26)
(DR11)
P3016R6
__cpp_lib_variant std::variant: type-safe объединение для C++17 201606L (C++17) P0088R3
P0393R3
P0032R3
std::visit для классов, производных от std::variant 202102L (C++23)
(DR17)
P2162R2
Полностью constexpr std::variant 202106L (C++23)
(DR20)
P2231R1
Членский visit 202306L (C++26) P2637R3
__cpp_lib_view_interface view_interface::at() 202606L (C++29) P3052R2
__cpp_lib_void_t std::void_t 201411L (C++17) N3911
Общее количество макросов: 294

Пример

Обычное использование

#ifdef __has_include                           // Check if __has_include is present
#  if __has_include(<optional>)                // Check for a standard library
#    include <optional>
#  elif __has_include(<experimental/optional>) // Check for an experimental version
#    include <experimental/optional>
#  elif __has_include(<boost/optional.hpp>)    // Try with an external library
#    include <boost/optional.hpp>
#  else                                        // Not found at all
#     error "Missing <optional>"
#  endif
#endif

#ifdef __has_cpp_attribute                      // Check if __has_cpp_attribute is present
#  if __has_cpp_attribute(deprecated)           // Check for an attribute
#    define DEPRECATED(msg) [[deprecated(msg)]]
#  endif
#endif
#ifndef DEPRECATED
#    define DEPRECATED(msg)
#endif

DEPRECATED("foo() has been deprecated") void foo();

#if __cpp_constexpr >= 201304                // Check for a specific version of a feature
#  define CONSTEXPR constexpr
#else
#  define CONSTEXPR inline
#endif

CONSTEXPR int bar(unsigned i)
{
#if __cpp_binary_literals                    // Check for the presence of a feature
    unsigned mask1 = 0b11000000;
    unsigned mask2 = 0b00000111;
#else
    unsigned mask1 = 0xC0;
    unsigned mask2 = 0x07;
#endif
    if (i & mask1)
        return 1;
    if (i & mask2)
        return 2;
    return 0;
}

int main() {}

Дамп возможностей компилятора

Следующая (совместимая с C++11) программа выводит на экран возможности и атрибуты компилятора C++. Обратите внимание, что использование __has_cpp_attribute() не является конформным и зависит от реализации gcc/clang.

static constexpr struct change_these_options_to_select_what_will_be_printed
{
    constexpr static int longest_macro_name { 50 };
    constexpr static bool titles               = 1;
    constexpr static bool counters             = 1;
    constexpr static bool attributes           = 1;
    constexpr static bool standard_values      = 1;
    constexpr static bool compiler_specific    = 1;
    constexpr static bool core_features        = 1;
    constexpr static bool lib_features         = 1;
    constexpr static bool supported_features   = 1;
    constexpr static bool unsupported_features = 1;
    constexpr static bool sort_by_date         = 0;
    constexpr static bool separate_year_month  = 1;
    constexpr static bool separated_revisions  = 1;
    constexpr static bool latest_revisions     = 1;
    constexpr static bool cxx98                = 0;
    constexpr static bool cxx11                = 1;
    constexpr static bool cxx14                = 1;
    constexpr static bool cxx17                = 1;
    constexpr static bool cxx20                = 1;
    constexpr static bool cxx23                = 1;
    constexpr static bool cxx26                = 1;
    constexpr static bool cxx29                = 1;
    constexpr static bool cxx32                = 0;
} print;

#if __cplusplus < 201100
#  error "C++11 or better is required"
#endif

#include <algorithm>
#include <cstdio>
#include <cstring>
#include <utility>
#include <vector>

#ifdef __has_include
# if __has_include(<version>)
#   include <version>
# endif
#endif

// Expect a string that starts with 6-decimal-digits or with '_' (if unsupported)
#define COMPILER_VALUE_INT(n) #n [0] == '_' or #n [0] == '0' ? 0 : \
    (#n[5] - '0') + (#n[4] - '0') * 10 + (#n[3] - '0') * 100 + \
    (#n[2] - '0') * 1000 + (#n[1] - '0') * 10000 + (#n[0] - '0') * 100000
#define COMPILER_FEATURE_ENTRY(expect, name) { #name, COMPILER_VALUE_INT(name), expect },

#if defined(__has_cpp_attribute) && defined(__GNUG__)
# define COMPILER_ATTRIBUTE(expect, name) { #name, __has_cpp_attribute(name), expect },
#else
# define COMPILER_ATTRIBUTE(expect, name) { #name, COMPILER_VALUE_INT(name), expect },
#endif

#define COMPILER_SPECIFIC_STRING(value) #value
#define COMPILER_SPECIFIC_ENTRY(name) { #name, COMPILER_SPECIFIC_STRING(name) },

class CompilerFeature
{
    char const* name_; long data_; long std_;
public:
    constexpr CompilerFeature(char const* name, long data, long std)
        : name_(name), data_(data), std_(std) {}
    constexpr CompilerFeature(CompilerFeature const&) = default;
    CompilerFeature& operator=(CompilerFeature const&) = default;
    bool operator<(CompilerFeature const& rhs) const
        { return std::strcmp(name_, rhs.name_) < 0; }
    bool operator==(CompilerFeature const& rhs) const
        { return std::strcmp(name_, rhs.name_) == 0; }
    constexpr bool supported() const { return data_ >= std_; }
    constexpr bool maybe() const { return data_ > 0; }
    constexpr char const* name() const { return name_; }
    constexpr long std() const { return std_; }
    constexpr long data() const { return data_; }
    void data(long x) { data_ = x; }
};

static /*constexpr*/ std::pair<const char*, const char*> compiler[] = {
    COMPILER_SPECIFIC_ENTRY(__cplusplus) //< not compiler specific, but useful :)
    COMPILER_SPECIFIC_ENTRY(__clang_major__)
    COMPILER_SPECIFIC_ENTRY(__clang_minor__)
    COMPILER_SPECIFIC_ENTRY(__clang_patchlevel__)
    COMPILER_SPECIFIC_ENTRY(__GNUG__)
    COMPILER_SPECIFIC_ENTRY(__GNUC_MINOR__)
    COMPILER_SPECIFIC_ENTRY(__GNUC_PATCHLEVEL__)
    // Add your favorite compiler specific macros. Undefined ones will not be printed.
};

static constexpr CompilerFeature cxx98_core[] = {
    COMPILER_FEATURE_ENTRY(199711L, __cpp_exceptions)
    COMPILER_FEATURE_ENTRY(199711L, __cpp_rtti)
};

static constexpr CompilerFeature cxx11_core[] = {
    COMPILER_FEATURE_ENTRY(200704L, __cpp_alias_templates)
    COMPILER_FEATURE_ENTRY(200809L, __cpp_attributes)
    COMPILER_FEATURE_ENTRY(200704L, __cpp_constexpr)
    COMPILER_FEATURE_ENTRY(201711L, __cpp_constexpr_in_decltype)
    COMPILER_FEATURE_ENTRY(200707L, __cpp_decltype)
    COMPILER_FEATURE_ENTRY(200604L, __cpp_delegating_constructors)
    COMPILER_FEATURE_ENTRY(201511L, __cpp_inheriting_constructors)
    COMPILER_FEATURE_ENTRY(200806L, __cpp_initializer_lists)
    COMPILER_FEATURE_ENTRY(200907L, __cpp_lambdas)
    COMPILER_FEATURE_ENTRY(200809L, __cpp_nsdmi)
    COMPILER_FEATURE_ENTRY(200907L, __cpp_range_based_for)
    COMPILER_FEATURE_ENTRY(200710L, __cpp_raw_strings)
    COMPILER_FEATURE_ENTRY(200710L, __cpp_ref_qualifiers)
    COMPILER_FEATURE_ENTRY(200610L, __cpp_rvalue_references)
    COMPILER_FEATURE_ENTRY(200410L, __cpp_static_assert)
    COMPILER_FEATURE_ENTRY(200806L, __cpp_threadsafe_static_init)
    COMPILER_FEATURE_ENTRY(200704L, __cpp_unicode_characters)
    COMPILER_FEATURE_ENTRY(200710L, __cpp_unicode_literals)
    COMPILER_FEATURE_ENTRY(200809L, __cpp_user_defined_literals)
    COMPILER_FEATURE_ENTRY(200704L, __cpp_variadic_templates)
};

static constexpr CompilerFeature cxx14_core[] = {
    COMPILER_FEATURE_ENTRY(201304L, __cpp_aggregate_nsdmi)
    COMPILER_FEATURE_ENTRY(201304L, __cpp_binary_literals)
    COMPILER_FEATURE_ENTRY(201304L, __cpp_constexpr)
    COMPILER_FEATURE_ENTRY(201304L, __cpp_decltype_auto)
    COMPILER_FEATURE_ENTRY(201304L, __cpp_generic_lambdas)
    COMPILER_FEATURE_ENTRY(201304L, __cpp_init_captures)
    COMPILER_FEATURE_ENTRY(201304L, __cpp_return_type_deduction)
    COMPILER_FEATURE_ENTRY(201309L, __cpp_sized_deallocation)
    COMPILER_FEATURE_ENTRY(201304L, __cpp_variable_templates)
};
static constexpr CompilerFeature cxx14_lib[] = {
    COMPILER_FEATURE_ENTRY(201304L, __cpp_lib_chrono_udls)
    COMPILER_FEATURE_ENTRY(201309L, __cpp_lib_complex_udls)
    COMPILER_FEATURE_ENTRY(201304L, __cpp_lib_exchange_function)
    COMPILER_FEATURE_ENTRY(201304L, __cpp_lib_generic_associative_lookup)
    COMPILER_FEATURE_ENTRY(201304L, __cpp_lib_integer_sequence)
    COMPILER_FEATURE_ENTRY(201304L, __cpp_lib_integral_constant_callable)
    COMPILER_FEATURE_ENTRY(201402L, __cpp_lib_is_final)
    COMPILER_FEATURE_ENTRY(201309L, __cpp_lib_is_null_pointer)
    COMPILER_FEATURE_ENTRY(201402L, __cpp_lib_make_reverse_iterator)
    COMPILER_FEATURE_ENTRY(201304L, __cpp_lib_make_unique)
    COMPILER_FEATURE_ENTRY(201304L, __cpp_lib_null_iterators)
    COMPILER_FEATURE_ENTRY(201304L, __cpp_lib_quoted_string_io)
    COMPILER_FEATURE_ENTRY(201210L, __cpp_lib_result_of_sfinae)
    COMPILER_FEATURE_ENTRY(201304L, __cpp_lib_robust_nonmodifying_seq_ops)
    COMPILER_FEATURE_ENTRY(201402L, __cpp_lib_shared_timed_mutex)
    COMPILER_FEATURE_ENTRY(201304L, __cpp_lib_string_udls)
    COMPILER_FEATURE_ENTRY(201304L, __cpp_lib_transformation_trait_aliases)
    COMPILER_FEATURE_ENTRY(201210L, __cpp_lib_transparent_operators)
    COMPILER_FEATURE_ENTRY(201402L, __cpp_lib_tuple_element_t)
    COMPILER_FEATURE_ENTRY(201304L, __cpp_lib_tuples_by_type)
};

static constexpr CompilerFeature cxx17_core[] = {
    COMPILER_FEATURE_ENTRY(201603L, __cpp_aggregate_bases)
    COMPILER_FEATURE_ENTRY(201606L, __cpp_aligned_new)
    COMPILER_FEATURE_ENTRY(201603L, __cpp_capture_star_this)
    COMPILER_FEATURE_ENTRY(201603L, __cpp_constexpr)
    COMPILER_FEATURE_ENTRY(201703L, __cpp_deduction_guides)
    COMPILER_FEATURE_ENTRY(201411L, __cpp_enumerator_attributes)
    COMPILER_FEATURE_ENTRY(201603L, __cpp_fold_expressions)
    COMPILER_FEATURE_ENTRY(201606L, __cpp_guaranteed_copy_elision)
    COMPILER_FEATURE_ENTRY(201603L, __cpp_hex_float)
    COMPILER_FEATURE_ENTRY(201606L, __cpp_if_constexpr)
    COMPILER_FEATURE_ENTRY(201606L, __cpp_inline_variables)
    COMPILER_FEATURE_ENTRY(201411L, __cpp_namespace_attributes)
    COMPILER_FEATURE_ENTRY(201510L, __cpp_noexcept_function_type)
    COMPILER_FEATURE_ENTRY(201411L, __cpp_nontype_template_args)
    COMPILER_FEATURE_ENTRY(201606L, __cpp_nontype_template_parameter_auto)
    COMPILER_FEATURE_ENTRY(201603L, __cpp_range_based_for)
    COMPILER_FEATURE_ENTRY(201411L, __cpp_static_assert)
    COMPILER_FEATURE_ENTRY(201606L, __cpp_structured_bindings)
    COMPILER_FEATURE_ENTRY(201611L, __cpp_template_template_args)
    COMPILER_FEATURE_ENTRY(201611L, __cpp_variadic_using)
};
static constexpr CompilerFeature cxx17_lib[] = {
    COMPILER_FEATURE_ENTRY(201603L, __cpp_lib_addressof_constexpr)
    COMPILER_FEATURE_ENTRY(201411L, __cpp_lib_allocator_traits_is_always_equal)
    COMPILER_FEATURE_ENTRY(201606L, __cpp_lib_any)
    COMPILER_FEATURE_ENTRY(201603L, __cpp_lib_apply)
    COMPILER_FEATURE_ENTRY(201603L, __cpp_lib_array_constexpr)
    COMPILER_FEATURE_ENTRY(201510L, __cpp_lib_as_const)
    COMPILER_FEATURE_ENTRY(201603L, __cpp_lib_atomic_is_always_lock_free)
    COMPILER_FEATURE_ENTRY(201505L, __cpp_lib_bool_constant)
    COMPILER_FEATURE_ENTRY(201603L, __cpp_lib_boyer_moore_searcher)
    COMPILER_FEATURE_ENTRY(201603L, __cpp_lib_byte)
    COMPILER_FEATURE_ENTRY(201611L, __cpp_lib_chrono)
    COMPILER_FEATURE_ENTRY(201603L, __cpp_lib_clamp)
    COMPILER_FEATURE_ENTRY(201603L, __cpp_lib_enable_shared_from_this)
    COMPILER_FEATURE_ENTRY(201603L, __cpp_lib_execution)
    COMPILER_FEATURE_ENTRY(201703L, __cpp_lib_filesystem)
    COMPILER_FEATURE_ENTRY(201606L, __cpp_lib_gcd_lcm)
    COMPILER_FEATURE_ENTRY(201703L, __cpp_lib_hardware_interference_size)
    COMPILER_FEATURE_ENTRY(201606L, __cpp_lib_has_unique_object_representations)
    COMPILER_FEATURE_ENTRY(201603L, __cpp_lib_hypot)
    COMPILER_FEATURE_ENTRY(201505L, __cpp_lib_incomplete_container_elements)
    COMPILER_FEATURE_ENTRY(201411L, __cpp_lib_invoke)
    COMPILER_FEATURE_ENTRY(201703L, __cpp_lib_is_aggregate)
    COMPILER_FEATURE_ENTRY(201703L, __cpp_lib_is_invocable)
    COMPILER_FEATURE_ENTRY(201603L, __cpp_lib_is_swappable)
    COMPILER_FEATURE_ENTRY(201606L, __cpp_lib_launder)
    COMPILER_FEATURE_ENTRY(201510L, __cpp_lib_logical_traits)
    COMPILER_FEATURE_ENTRY(201606L, __cpp_lib_make_from_tuple)
    COMPILER_FEATURE_ENTRY(201411L, __cpp_lib_map_try_emplace)
    COMPILER_FEATURE_ENTRY(201603L, __cpp_lib_math_special_functions)
    COMPILER_FEATURE_ENTRY(201603L, __cpp_lib_memory_resource)
    COMPILER_FEATURE_ENTRY(201606L, __cpp_lib_node_extract)
    COMPILER_FEATURE_ENTRY(201411L, __cpp_lib_nonmember_container_access)
    COMPILER_FEATURE_ENTRY(201603L, __cpp_lib_not_fn)
    COMPILER_FEATURE_ENTRY(201606L, __cpp_lib_optional)
    COMPILER_FEATURE_ENTRY(201603L, __cpp_lib_parallel_algorithm)
    COMPILER_FEATURE_ENTRY(201606L, __cpp_lib_raw_memory_algorithms)
    COMPILER_FEATURE_ENTRY(201603L, __cpp_lib_sample)
    COMPILER_FEATURE_ENTRY(201703L, __cpp_lib_scoped_lock)
    COMPILER_FEATURE_ENTRY(201505L, __cpp_lib_shared_mutex)
    COMPILER_FEATURE_ENTRY(201611L, __cpp_lib_shared_ptr_arrays)
    COMPILER_FEATURE_ENTRY(201606L, __cpp_lib_shared_ptr_weak_type)
    COMPILER_FEATURE_ENTRY(201606L, __cpp_lib_string_view)
    COMPILER_FEATURE_ENTRY(201611L, __cpp_lib_to_chars)
    COMPILER_FEATURE_ENTRY(201510L, __cpp_lib_transparent_operators)
    COMPILER_FEATURE_ENTRY(201510L, __cpp_lib_type_trait_variable_templates)
    COMPILER_FEATURE_ENTRY(201411L, __cpp_lib_uncaught_exceptions)
    COMPILER_FEATURE_ENTRY(201411L, __cpp_lib_unordered_map_try_emplace)
    COMPILER_FEATURE_ENTRY(202102L, __cpp_lib_variant)
    COMPILER_FEATURE_ENTRY(201411L, __cpp_lib_void_t)
};

static constexpr CompilerFeature cxx20_core[] = {
    COMPILER_FEATURE_ENTRY(201902L, __cpp_aggregate_paren_init)
    COMPILER_FEATURE_ENTRY(202207L, __cpp_char8_t)
    COMPILER_FEATURE_ENTRY(202002L, __cpp_concepts)
    COMPILER_FEATURE_ENTRY(201806L, __cpp_conditional_explicit)
    COMPILER_FEATURE_ENTRY(202211L, __cpp_consteval)
    COMPILER_FEATURE_ENTRY(202002L, __cpp_constexpr)
    COMPILER_FEATURE_ENTRY(201907L, __cpp_constexpr_dynamic_alloc)
    COMPILER_FEATURE_ENTRY(201907L, __cpp_constinit)
    COMPILER_FEATURE_ENTRY(201907L, __cpp_deduction_guides)
    COMPILER_FEATURE_ENTRY(201707L, __cpp_designated_initializers)
    COMPILER_FEATURE_ENTRY(201707L, __cpp_generic_lambdas)
    COMPILER_FEATURE_ENTRY(201902L, __cpp_impl_coroutine)
    COMPILER_FEATURE_ENTRY(201806L, __cpp_impl_destroying_delete)
    COMPILER_FEATURE_ENTRY(201907L, __cpp_impl_three_way_comparison)
    COMPILER_FEATURE_ENTRY(201803L, __cpp_init_captures)
    COMPILER_FEATURE_ENTRY(201907L, __cpp_modules)
    COMPILER_FEATURE_ENTRY(201911L, __cpp_nontype_template_args)
    COMPILER_FEATURE_ENTRY(201907L, __cpp_using_enum)
};
static constexpr CompilerFeature cxx20_lib[] = {
    COMPILER_FEATURE_ENTRY(201811L, __cpp_lib_array_constexpr)
    COMPILER_FEATURE_ENTRY(201811L, __cpp_lib_assume_aligned)
    COMPILER_FEATURE_ENTRY(201907L, __cpp_lib_atomic_flag_test)
    COMPILER_FEATURE_ENTRY(201711L, __cpp_lib_atomic_float)
    COMPILER_FEATURE_ENTRY(201907L, __cpp_lib_atomic_lock_free_type_aliases)
    COMPILER_FEATURE_ENTRY(201806L, __cpp_lib_atomic_ref)
    COMPILER_FEATURE_ENTRY(201711L, __cpp_lib_atomic_shared_ptr)
    COMPILER_FEATURE_ENTRY(201911L, __cpp_lib_atomic_value_initialization)
    COMPILER_FEATURE_ENTRY(201907L, __cpp_lib_atomic_wait)
    COMPILER_FEATURE_ENTRY(201907L, __cpp_lib_barrier)
    COMPILER_FEATURE_ENTRY(201907L, __cpp_lib_bind_front)
    COMPILER_FEATURE_ENTRY(201806L, __cpp_lib_bit_cast)
    COMPILER_FEATURE_ENTRY(201907L, __cpp_lib_bitops)
    COMPILER_FEATURE_ENTRY(201902L, __cpp_lib_bounded_array_traits)
    COMPILER_FEATURE_ENTRY(201907L, __cpp_lib_char8_t)
    COMPILER_FEATURE_ENTRY(201907L, __cpp_lib_chrono)
    COMPILER_FEATURE_ENTRY(202002L, __cpp_lib_concepts)
    COMPILER_FEATURE_ENTRY(201806L, __cpp_lib_constexpr_algorithms)
    COMPILER_FEATURE_ENTRY(201711L, __cpp_lib_constexpr_complex)
    COMPILER_FEATURE_ENTRY(201907L, __cpp_lib_constexpr_dynamic_alloc)
    COMPILER_FEATURE_ENTRY(201907L, __cpp_lib_constexpr_functional)
    COMPILER_FEATURE_ENTRY(201811L, __cpp_lib_constexpr_iterator)
    COMPILER_FEATURE_ENTRY(201811L, __cpp_lib_constexpr_memory)
    COMPILER_FEATURE_ENTRY(201911L, __cpp_lib_constexpr_numeric)
    COMPILER_FEATURE_ENTRY(201907L, __cpp_lib_constexpr_string)
    COMPILER_FEATURE_ENTRY(201811L, __cpp_lib_constexpr_string_view)
    COMPILER_FEATURE_ENTRY(201811L, __cpp_lib_constexpr_tuple)
    COMPILER_FEATURE_ENTRY(201811L, __cpp_lib_constexpr_utility)
    COMPILER_FEATURE_ENTRY(201907L, __cpp_lib_constexpr_vector)
    COMPILER_FEATURE_ENTRY(201902L, __cpp_lib_coroutine)
    COMPILER_FEATURE_ENTRY(201806L, __cpp_lib_destroying_delete)
    COMPILER_FEATURE_ENTRY(201907L, __cpp_lib_endian)
    COMPILER_FEATURE_ENTRY(202002L, __cpp_lib_erase_if)
    COMPILER_FEATURE_ENTRY(201902L, __cpp_lib_execution)
    COMPILER_FEATURE_ENTRY(202110L, __cpp_lib_format)
    COMPILER_FEATURE_ENTRY(201811L, __cpp_lib_generic_unordered_lookup)
    COMPILER_FEATURE_ENTRY(202002L, __cpp_lib_int_pow2)
    COMPILER_FEATURE_ENTRY(202002L, __cpp_lib_integer_comparison_functions)
    COMPILER_FEATURE_ENTRY(201902L, __cpp_lib_interpolate)
    COMPILER_FEATURE_ENTRY(201811L, __cpp_lib_is_constant_evaluated)
    COMPILER_FEATURE_ENTRY(201907L, __cpp_lib_is_layout_compatible)
    COMPILER_FEATURE_ENTRY(201806L, __cpp_lib_is_nothrow_convertible)
    COMPILER_FEATURE_ENTRY(201907L, __cpp_lib_is_pointer_interconvertible)
    COMPILER_FEATURE_ENTRY(201911L, __cpp_lib_jthread)
    COMPILER_FEATURE_ENTRY(201907L, __cpp_lib_latch)
    COMPILER_FEATURE_ENTRY(201806L, __cpp_lib_list_remove_return_type)
    COMPILER_FEATURE_ENTRY(201907L, __cpp_lib_math_constants)
    COMPILER_FEATURE_ENTRY(202106L, __cpp_lib_optional)
    COMPILER_FEATURE_ENTRY(201902L, __cpp_lib_polymorphic_allocator)
    COMPILER_FEATURE_ENTRY(202110L, __cpp_lib_ranges)
    COMPILER_FEATURE_ENTRY(201711L, __cpp_lib_remove_cvref)
    COMPILER_FEATURE_ENTRY(201907L, __cpp_lib_semaphore)
    COMPILER_FEATURE_ENTRY(201707L, __cpp_lib_shared_ptr_arrays)
    COMPILER_FEATURE_ENTRY(201806L, __cpp_lib_shift)
    COMPILER_FEATURE_ENTRY(202002L, __cpp_lib_smart_ptr_for_overwrite)
    COMPILER_FEATURE_ENTRY(201907L, __cpp_lib_source_location)
    COMPILER_FEATURE_ENTRY(202002L, __cpp_lib_span)
    COMPILER_FEATURE_ENTRY(201902L, __cpp_lib_ssize)
    COMPILER_FEATURE_ENTRY(201711L, __cpp_lib_starts_ends_with)
    COMPILER_FEATURE_ENTRY(201803L, __cpp_lib_string_view)
    COMPILER_FEATURE_ENTRY(201803L, __cpp_lib_syncbuf)
    COMPILER_FEATURE_ENTRY(201907L, __cpp_lib_three_way_comparison)
    COMPILER_FEATURE_ENTRY(201711L, __cpp_lib_to_address)
    COMPILER_FEATURE_ENTRY(201907L, __cpp_lib_to_array)
    COMPILER_FEATURE_ENTRY(201806L, __cpp_lib_type_identity)
    COMPILER_FEATURE_ENTRY(201811L, __cpp_lib_unwrap_ref)
    COMPILER_FEATURE_ENTRY(202106L, __cpp_lib_variant)
};

static constexpr CompilerFeature cxx23_core[] = {
    COMPILER_FEATURE_ENTRY(202110L, __cpp_auto_cast)
    COMPILER_FEATURE_ENTRY(202211L, __cpp_constexpr)
    COMPILER_FEATURE_ENTRY(202110L, __cpp_explicit_this_parameter)
    COMPILER_FEATURE_ENTRY(202106L, __cpp_if_consteval)
    COMPILER_FEATURE_ENTRY(202207L, __cpp_implicit_move)
    COMPILER_FEATURE_ENTRY(202211L, __cpp_multidimensional_subscript)
    COMPILER_FEATURE_ENTRY(202207L, __cpp_named_character_escapes)
    COMPILER_FEATURE_ENTRY(202211L, __cpp_range_based_for)
    COMPILER_FEATURE_ENTRY(202011L, __cpp_size_t_suffix)
    COMPILER_FEATURE_ENTRY(202207L, __cpp_static_call_operator)
};
static constexpr CompilerFeature cxx23_lib[] = {
    COMPILER_FEATURE_ENTRY(202106L, __cpp_lib_adaptor_iterator_pair_constructor)
    COMPILER_FEATURE_ENTRY(202207L, __cpp_lib_algorithm_iterator_requirements)
    COMPILER_FEATURE_ENTRY(202302L, __cpp_lib_allocate_at_least)
    COMPILER_FEATURE_ENTRY(202110L, __cpp_lib_associative_heterogeneous_erasure)
    COMPILER_FEATURE_ENTRY(202302L, __cpp_lib_barrier)
    COMPILER_FEATURE_ENTRY(202202L, __cpp_lib_bind_back)
    COMPILER_FEATURE_ENTRY(202110L, __cpp_lib_byteswap)
    COMPILER_FEATURE_ENTRY(202302L, __cpp_lib_common_reference)
    COMPILER_FEATURE_ENTRY(202302L, __cpp_lib_common_reference_wrapper)
    COMPILER_FEATURE_ENTRY(202207L, __cpp_lib_concepts)
    COMPILER_FEATURE_ENTRY(202207L, __cpp_lib_constexpr_bitset)
    COMPILER_FEATURE_ENTRY(202207L, __cpp_lib_constexpr_charconv)
    COMPILER_FEATURE_ENTRY(202202L, __cpp_lib_constexpr_cmath)
    COMPILER_FEATURE_ENTRY(202202L, __cpp_lib_constexpr_memory)
    COMPILER_FEATURE_ENTRY(202106L, __cpp_lib_constexpr_typeinfo)
    COMPILER_FEATURE_ENTRY(202202L, __cpp_lib_containers_ranges)
    COMPILER_FEATURE_ENTRY(202211L, __cpp_lib_expected)
    COMPILER_FEATURE_ENTRY(202207L, __cpp_lib_flat_map)
    COMPILER_FEATURE_ENTRY(202207L, __cpp_lib_flat_set)
    COMPILER_FEATURE_ENTRY(202207L, __cpp_lib_format)
    COMPILER_FEATURE_ENTRY(202207L, __cpp_lib_format_ranges)
    COMPILER_FEATURE_ENTRY(202302L, __cpp_lib_formatters)
    COMPILER_FEATURE_ENTRY(202207L, __cpp_lib_forward_like)
    COMPILER_FEATURE_ENTRY(202207L, __cpp_lib_generator)
    COMPILER_FEATURE_ENTRY(202106L, __cpp_lib_invoke_r)
    COMPILER_FEATURE_ENTRY(202207L, __cpp_lib_ios_noreplace)
    COMPILER_FEATURE_ENTRY(202302L, __cpp_lib_is_implicit_lifetime)
    COMPILER_FEATURE_ENTRY(202011L, __cpp_lib_is_scoped_enum)
    COMPILER_FEATURE_ENTRY(202207L, __cpp_lib_mdspan)
    COMPILER_FEATURE_ENTRY(202207L, __cpp_lib_modules)
    COMPILER_FEATURE_ENTRY(202207L, __cpp_lib_move_iterator_concept)
    COMPILER_FEATURE_ENTRY(202110L, __cpp_lib_move_only_function)
    COMPILER_FEATURE_ENTRY(202110L, __cpp_lib_optional)
    COMPILER_FEATURE_ENTRY(202106L, __cpp_lib_out_ptr)
    COMPILER_FEATURE_ENTRY(202207L, __cpp_lib_print)
    COMPILER_FEATURE_ENTRY(202302L, __cpp_lib_ranges)
    COMPILER_FEATURE_ENTRY(202207L, __cpp_lib_ranges_as_const)
    COMPILER_FEATURE_ENTRY(202207L, __cpp_lib_ranges_as_rvalue)
    COMPILER_FEATURE_ENTRY(202207L, __cpp_lib_ranges_cartesian_product)
    COMPILER_FEATURE_ENTRY(202202L, __cpp_lib_ranges_chunk)
    COMPILER_FEATURE_ENTRY(202202L, __cpp_lib_ranges_chunk_by)
    COMPILER_FEATURE_ENTRY(202207L, __cpp_lib_ranges_contains)
    COMPILER_FEATURE_ENTRY(202302L, __cpp_lib_ranges_enumerate)
    COMPILER_FEATURE_ENTRY(202207L, __cpp_lib_ranges_find_last)
    COMPILER_FEATURE_ENTRY(202207L, __cpp_lib_ranges_fold)
    COMPILER_FEATURE_ENTRY(202202L, __cpp_lib_ranges_iota)
    COMPILER_FEATURE_ENTRY(202202L, __cpp_lib_ranges_join_with)
    COMPILER_FEATURE_ENTRY(202207L, __cpp_lib_ranges_repeat)
    COMPILER_FEATURE_ENTRY(202202L, __cpp_lib_ranges_slide)
    COMPILER_FEATURE_ENTRY(202106L, __cpp_lib_ranges_starts_ends_with)
    COMPILER_FEATURE_ENTRY(202207L, __cpp_lib_ranges_stride)
    COMPILER_FEATURE_ENTRY(202202L, __cpp_lib_ranges_to_container)
    COMPILER_FEATURE_ENTRY(202110L, __cpp_lib_ranges_zip)
    COMPILER_FEATURE_ENTRY(202202L, __cpp_lib_reference_from_temporary)
    COMPILER_FEATURE_ENTRY(202202L, __cpp_lib_shift)
    COMPILER_FEATURE_ENTRY(202106L, __cpp_lib_spanstream)
    COMPILER_FEATURE_ENTRY(202011L, __cpp_lib_stacktrace)
    COMPILER_FEATURE_ENTRY(202207L, __cpp_lib_start_lifetime_as)
    COMPILER_FEATURE_ENTRY(202011L, __cpp_lib_stdatomic_h)
    COMPILER_FEATURE_ENTRY(202011L, __cpp_lib_string_contains)
    COMPILER_FEATURE_ENTRY(202110L, __cpp_lib_string_resize_and_overwrite)
    COMPILER_FEATURE_ENTRY(202102L, __cpp_lib_to_underlying)
    COMPILER_FEATURE_ENTRY(202207L, __cpp_lib_tuple_like)
    COMPILER_FEATURE_ENTRY(202202L, __cpp_lib_unreachable)
};

static constexpr CompilerFeature cxx26_core[] = {
    COMPILER_FEATURE_ENTRY(202406L, __cpp_constexpr)
    COMPILER_FEATURE_ENTRY(202411L, __cpp_constexpr_exceptions)
    COMPILER_FEATURE_ENTRY(202506L, __cpp_constexpr_virtual_inheritance)
    COMPILER_FEATURE_ENTRY(202502L, __cpp_contracts)
    COMPILER_FEATURE_ENTRY(202403L, __cpp_deleted_function)
    COMPILER_FEATURE_ENTRY(202506L, __cpp_expansion_statements)
    COMPILER_FEATURE_ENTRY(202406L, __cpp_fold_expressions)
    COMPILER_FEATURE_ENTRY(202603L, __cpp_impl_reflection)
    COMPILER_FEATURE_ENTRY(202311L, __cpp_pack_indexing)
    COMPILER_FEATURE_ENTRY(202306L, __cpp_placeholder_variables)
    COMPILER_FEATURE_ENTRY(202502L, __cpp_pp_embed)
    COMPILER_FEATURE_ENTRY(202306L, __cpp_static_assert)
    COMPILER_FEATURE_ENTRY(202411L, __cpp_structured_bindings)
    COMPILER_FEATURE_ENTRY(202502L, __cpp_template_parameters)
    COMPILER_FEATURE_ENTRY(202603L, __cpp_trivial_union)
    COMPILER_FEATURE_ENTRY(202403L, __cpp_variadic_friend)
};
static constexpr CompilerFeature cxx26_lib[] = {
    COMPILER_FEATURE_ENTRY(202603L, __cpp_lib_algorithm_default_value_type)
    COMPILER_FEATURE_ENTRY(202411L, __cpp_lib_aligned_accessor)
    COMPILER_FEATURE_ENTRY(202506L, __cpp_lib_apply)
    COMPILER_FEATURE_ENTRY(202311L, __cpp_lib_associative_heterogeneous_insertion)
    COMPILER_FEATURE_ENTRY(202506L, __cpp_lib_atomic_min_max)
    COMPILER_FEATURE_ENTRY(202506L, __cpp_lib_atomic_reductions)
    COMPILER_FEATURE_ENTRY(202603L, __cpp_lib_atomic_ref)
    COMPILER_FEATURE_ENTRY(202306L, __cpp_lib_bind_back)
    COMPILER_FEATURE_ENTRY(202306L, __cpp_lib_bind_front)
    COMPILER_FEATURE_ENTRY(202306L, __cpp_lib_bitset)
    COMPILER_FEATURE_ENTRY(202306L, __cpp_lib_chrono)
    COMPILER_FEATURE_ENTRY(202603L, __cpp_lib_constant_wrapper)
    COMPILER_FEATURE_ENTRY(202306L, __cpp_lib_constexpr_algorithms)
    COMPILER_FEATURE_ENTRY(202411L, __cpp_lib_constexpr_atomic)
    COMPILER_FEATURE_ENTRY(202306L, __cpp_lib_constexpr_cmath)
    COMPILER_FEATURE_ENTRY(202306L, __cpp_lib_constexpr_complex)
    COMPILER_FEATURE_ENTRY(202502L, __cpp_lib_constexpr_deque)
    COMPILER_FEATURE_ENTRY(202502L, __cpp_lib_constexpr_exceptions)
    COMPILER_FEATURE_ENTRY(202502L, __cpp_lib_constexpr_flat_map)
    COMPILER_FEATURE_ENTRY(202502L, __cpp_lib_constexpr_flat_set)
    COMPILER_FEATURE_ENTRY(202511L, __cpp_lib_constexpr_format)
    COMPILER_FEATURE_ENTRY(202502L, __cpp_lib_constexpr_forward_list)
    COMPILER_FEATURE_ENTRY(202502L, __cpp_lib_constexpr_inplace_vector)
    COMPILER_FEATURE_ENTRY(202502L, __cpp_lib_constexpr_list)
    COMPILER_FEATURE_ENTRY(202502L, __cpp_lib_constexpr_map)
    COMPILER_FEATURE_ENTRY(202506L, __cpp_lib_constexpr_memory)
    COMPILER_FEATURE_ENTRY(202406L, __cpp_lib_constexpr_new)
    COMPILER_FEATURE_ENTRY(202502L, __cpp_lib_constexpr_queue)
    COMPILER_FEATURE_ENTRY(202502L, __cpp_lib_constexpr_set)
    COMPILER_FEATURE_ENTRY(202502L, __cpp_lib_constexpr_stack)
    COMPILER_FEATURE_ENTRY(202502L, __cpp_lib_constexpr_unordered_map)
    COMPILER_FEATURE_ENTRY(202502L, __cpp_lib_constexpr_unordered_set)
    COMPILER_FEATURE_ENTRY(202411L, __cpp_lib_constrained_equality)
    COMPILER_FEATURE_ENTRY(202502L, __cpp_lib_contracts)
    COMPILER_FEATURE_ENTRY(202306L, __cpp_lib_copyable_function)
    COMPILER_FEATURE_ENTRY(202506L, __cpp_lib_counting_scope)
    COMPILER_FEATURE_ENTRY(202403L, __cpp_lib_debugging)
    COMPILER_FEATURE_ENTRY(202506L, __cpp_lib_define_static)
    COMPILER_FEATURE_ENTRY(202603L, __cpp_lib_exception_ptr_cast)
    COMPILER_FEATURE_ENTRY(202511L, __cpp_lib_flat_map)
    COMPILER_FEATURE_ENTRY(202511L, __cpp_lib_flat_set)
    COMPILER_FEATURE_ENTRY(202603L, __cpp_lib_format)
    COMPILER_FEATURE_ENTRY(202506L, __cpp_lib_format_path)
    COMPILER_FEATURE_ENTRY(202311L, __cpp_lib_format_uchar)
    COMPILER_FEATURE_ENTRY(202502L, __cpp_lib_freestanding_algorithm)
    COMPILER_FEATURE_ENTRY(202311L, __cpp_lib_freestanding_array)
    COMPILER_FEATURE_ENTRY(202306L, __cpp_lib_freestanding_char_traits)
    COMPILER_FEATURE_ENTRY(202306L, __cpp_lib_freestanding_charconv)
    COMPILER_FEATURE_ENTRY(202306L, __cpp_lib_freestanding_cstdlib)
    COMPILER_FEATURE_ENTRY(202311L, __cpp_lib_freestanding_cstring)
    COMPILER_FEATURE_ENTRY(202306L, __cpp_lib_freestanding_cwchar)
    COMPILER_FEATURE_ENTRY(202306L, __cpp_lib_freestanding_errc)
    COMPILER_FEATURE_ENTRY(202502L, __cpp_lib_freestanding_execution)
    COMPILER_FEATURE_ENTRY(202311L, __cpp_lib_freestanding_expected)
    COMPILER_FEATURE_ENTRY(202306L, __cpp_lib_freestanding_feature_test_macros)
    COMPILER_FEATURE_ENTRY(202306L, __cpp_lib_freestanding_functional)
    COMPILER_FEATURE_ENTRY(202306L, __cpp_lib_freestanding_iterator)
    COMPILER_FEATURE_ENTRY(202311L, __cpp_lib_freestanding_mdspan)
    COMPILER_FEATURE_ENTRY(202502L, __cpp_lib_freestanding_memory)
    COMPILER_FEATURE_ENTRY(202502L, __cpp_lib_freestanding_numeric)
    COMPILER_FEATURE_ENTRY(202306L, __cpp_lib_freestanding_operator_new)
    COMPILER_FEATURE_ENTRY(202506L, __cpp_lib_freestanding_optional)
    COMPILER_FEATURE_ENTRY(202502L, __cpp_lib_freestanding_random)
    COMPILER_FEATURE_ENTRY(202306L, __cpp_lib_freestanding_ranges)
    COMPILER_FEATURE_ENTRY(202306L, __cpp_lib_freestanding_ratio)
    COMPILER_FEATURE_ENTRY(202311L, __cpp_lib_freestanding_string_view)
    COMPILER_FEATURE_ENTRY(202306L, __cpp_lib_freestanding_tuple)
    COMPILER_FEATURE_ENTRY(202306L, __cpp_lib_freestanding_utility)
    COMPILER_FEATURE_ENTRY(202311L, __cpp_lib_freestanding_variant)
    COMPILER_FEATURE_ENTRY(202306L, __cpp_lib_fstream_native_handle)
    COMPILER_FEATURE_ENTRY(202604L, __cpp_lib_function_ref)
    COMPILER_FEATURE_ENTRY(202306L, __cpp_lib_hazard_pointer)
    COMPILER_FEATURE_ENTRY(202502L, __cpp_lib_hive)
    COMPILER_FEATURE_ENTRY(202502L, __cpp_lib_indirect)
    COMPILER_FEATURE_ENTRY(202511L, __cpp_lib_initializer_list)
    COMPILER_FEATURE_ENTRY(202603L, __cpp_lib_inplace_vector)
    COMPILER_FEATURE_ENTRY(202511L, __cpp_lib_integer_sequence)
    COMPILER_FEATURE_ENTRY(202603L, __cpp_lib_is_structural)
    COMPILER_FEATURE_ENTRY(202411L, __cpp_lib_is_sufficiently_aligned)
    COMPILER_FEATURE_ENTRY(202406L, __cpp_lib_is_virtual_base_of)
    COMPILER_FEATURE_ENTRY(202603L, __cpp_lib_is_within_lifetime)
    COMPILER_FEATURE_ENTRY(202511L, __cpp_lib_linalg)
    COMPILER_FEATURE_ENTRY(202406L, __cpp_lib_mdspan)
    COMPILER_FEATURE_ENTRY(202306L, __cpp_lib_not_fn)
    COMPILER_FEATURE_ENTRY(202506L, __cpp_lib_observable_checkpoint)
    COMPILER_FEATURE_ENTRY(202506L, __cpp_lib_optional)
    COMPILER_FEATURE_ENTRY(202406L, __cpp_lib_optional_range_support)
    COMPILER_FEATURE_ENTRY(202311L, __cpp_lib_out_ptr)
    COMPILER_FEATURE_ENTRY(202506L, __cpp_lib_parallel_algorithm)
    COMPILER_FEATURE_ENTRY(202506L, __cpp_lib_parallel_scheduler)
    COMPILER_FEATURE_ENTRY(202406L, __cpp_lib_philox_engine)
    COMPILER_FEATURE_ENTRY(202502L, __cpp_lib_polymorphic)
    COMPILER_FEATURE_ENTRY(202403L, __cpp_lib_print)
    COMPILER_FEATURE_ENTRY(202406L, __cpp_lib_ranges)
    COMPILER_FEATURE_ENTRY(202311L, __cpp_lib_ranges_as_const)
    COMPILER_FEATURE_ENTRY(202502L, __cpp_lib_ranges_as_input)
    COMPILER_FEATURE_ENTRY(202411L, __cpp_lib_ranges_cache_latest)
    COMPILER_FEATURE_ENTRY(202403L, __cpp_lib_ranges_concat)
    COMPILER_FEATURE_ENTRY(202603L, __cpp_lib_ranges_filter)
    COMPILER_FEATURE_ENTRY(202403L, __cpp_lib_ranges_generate_random)
    COMPILER_FEATURE_ENTRY(202506L, __cpp_lib_ranges_indices)
    COMPILER_FEATURE_ENTRY(202502L, __cpp_lib_ranges_reserve_hint)
    COMPILER_FEATURE_ENTRY(202306L, __cpp_lib_ratio)
    COMPILER_FEATURE_ENTRY(202411L, __cpp_lib_raw_memory_algorithms)
    COMPILER_FEATURE_ENTRY(202306L, __cpp_lib_rcu)
    COMPILER_FEATURE_ENTRY(202403L, __cpp_lib_reference_wrapper)
    COMPILER_FEATURE_ENTRY(202603L, __cpp_lib_reflection)
    COMPILER_FEATURE_ENTRY(202603L, __cpp_lib_replaceable_contract_violation_handler)
    COMPILER_FEATURE_ENTRY(202603L, __cpp_lib_saturation_arithmetic)
    COMPILER_FEATURE_ENTRY(202506L, __cpp_lib_senders)
    COMPILER_FEATURE_ENTRY(202603L, __cpp_lib_simd)
    COMPILER_FEATURE_ENTRY(202502L, __cpp_lib_simd_complex)
    COMPILER_FEATURE_ENTRY(202506L, __cpp_lib_simd_permutations)
    COMPILER_FEATURE_ENTRY(202306L, __cpp_lib_smart_ptr_owner_equality)
    COMPILER_FEATURE_ENTRY(202311L, __cpp_lib_span)
    COMPILER_FEATURE_ENTRY(202306L, __cpp_lib_sstream_from_string_view)
    COMPILER_FEATURE_ENTRY(202603L, __cpp_lib_start_lifetime)
    COMPILER_FEATURE_ENTRY(202603L, __cpp_lib_stdbit_h)
    COMPILER_FEATURE_ENTRY(202603L, __cpp_lib_stdckdint_h)
    COMPILER_FEATURE_ENTRY(202506L, __cpp_lib_string_subview)
    COMPILER_FEATURE_ENTRY(202403L, __cpp_lib_string_view)
    COMPILER_FEATURE_ENTRY(202603L, __cpp_lib_submdspan)
    COMPILER_FEATURE_ENTRY(202506L, __cpp_lib_task)
    COMPILER_FEATURE_ENTRY(202306L, __cpp_lib_text_encoding)
    COMPILER_FEATURE_ENTRY(202306L, __cpp_lib_to_chars)
    COMPILER_FEATURE_ENTRY(202306L, __cpp_lib_to_string)
    COMPILER_FEATURE_ENTRY(202311L, __cpp_lib_tuple_like)
    COMPILER_FEATURE_ENTRY(202506L, __cpp_lib_type_order)
    COMPILER_FEATURE_ENTRY(202511L, __cpp_lib_valarray)
    COMPILER_FEATURE_ENTRY(202306L, __cpp_lib_variant)
};

static constexpr CompilerFeature cxx29_core[] = {
    //< Continue to Populate
    COMPILER_FEATURE_ENTRY(202606L, __cpp_concepts)
    COMPILER_FEATURE_ENTRY(202606L, __cpp_consteval)
    COMPILER_FEATURE_ENTRY(202606L, __cpp_contracts)
    COMPILER_FEATURE_ENTRY(202606L, __cpp_designated_initializers)
    COMPILER_FEATURE_ENTRY(202606L, __cpp_impl_coroutine)
    COMPILER_FEATURE_ENTRY(202606L, __cpp_pack_indexing)
    COMPILER_FEATURE_ENTRY(202606L, __cpp_pp_embed)
};
static constexpr CompilerFeature cxx29_lib[] = {
    //< Continue to Populate
    COMPILER_FEATURE_ENTRY(202606L, __cpp_lib_bitops)
    COMPILER_FEATURE_ENTRY(202606L, __cpp_lib_constant_wrapper)
    COMPILER_FEATURE_ENTRY(202606L, __cpp_lib_expected)
    COMPILER_FEATURE_ENTRY(202606L, __cpp_lib_hazard_pointer)
    COMPILER_FEATURE_ENTRY(202606L, __cpp_lib_map_lookup)
    COMPILER_FEATURE_ENTRY(202606L, __cpp_lib_mdspan_copy)
    COMPILER_FEATURE_ENTRY(202606L, __cpp_lib_pointer_tag_pair)
    COMPILER_FEATURE_ENTRY(202606L, __cpp_lib_simd)
    COMPILER_FEATURE_ENTRY(202606L, __cpp_lib_simd_bitops)
    COMPILER_FEATURE_ENTRY(202606L, __cpp_lib_thread_attributes)
    COMPILER_FEATURE_ENTRY(202606L, __cpp_lib_to_chars)
    COMPILER_FEATURE_ENTRY(202606L, __cpp_lib_view_interface)
};

static constexpr CompilerFeature cxx32_core[] = {
    //< Continue to Populate
    COMPILER_FEATURE_ENTRY(202906L, __cpp_core_TODO)
};
static constexpr CompilerFeature cxx32_lib[] = {
    //< Continue to Populate
    COMPILER_FEATURE_ENTRY(202906L, __cpp_lib_TODO)
};

static constexpr CompilerFeature attributes[] = {
    COMPILER_ATTRIBUTE(202207L, assume)
    COMPILER_ATTRIBUTE(200809L, carries_dependency)
    COMPILER_ATTRIBUTE(201309L, deprecated)
    COMPILER_ATTRIBUTE(201603L, fallthrough)
    COMPILER_ATTRIBUTE(202403L, indeterminate)
    COMPILER_ATTRIBUTE(201803L, likely)
    COMPILER_ATTRIBUTE(201603L, maybe_unused)
    COMPILER_ATTRIBUTE(201803L, no_unique_address)
    COMPILER_ATTRIBUTE(201907L, nodiscard)
    COMPILER_ATTRIBUTE(200809L, noreturn)
    COMPILER_ATTRIBUTE(201803L, unlikely)
};

inline void show_compiler_specific_info()
{
    std::printf("Compiler specific macros:\n");
    for (auto co : compiler)
        if (std::strcmp(co.first, co.second))
            std::printf("%*s %s\n", -print.longest_macro_name, co.first, co.second);
}

inline void print_compiler_feature(const CompilerFeature& x)
{
    if (not ((print.supported_features and x.maybe()) or
            (print.unsupported_features and not x.maybe())))
        return;
    auto print_year_month = [](long n)
    {
        return std::printf("%ld%s%02ld",
            n / 100, print.separate_year_month ? "-" : "", n % 100);
    };
    std::printf("%*s ", -print.longest_macro_name, x.name());
    x.maybe() ? print_year_month(x.data()) :
                    std::printf("------%s", print.separate_year_month ? "-" : "");
    if (print.standard_values)
        std::printf("  %c  ", (x.supported() ? (x.data() > x.std() ? '>' : '=') : '<')),
            print_year_month(x.std());
    std::puts("");
}

template<class Container>
inline void show(char const* const title, Container const& co)
{
    if (print.titles)
    {
        std::printf("%-s (", title);
        if (print.counters)
        {
            std::printf("%zd/", std::count_if(std::begin(co), std::end(co),
                [](CompilerFeature x)
                {
                    return x.supported();
                }));
        }
        std::printf("%td)\n", std::distance(std::begin(co), std::end(co)));
    }
    if (print.sort_by_date)
    {
        std::vector<CompilerFeature> v(std::begin(co), std::end(co));
        std::stable_sort(v.begin(), v.end(),
            [](CompilerFeature const& lhs, CompilerFeature const& rhs)
            {
                return lhs.data() < rhs.data();
            });
        std::for_each(v.cbegin(), v.cend(), print_compiler_feature);
    }
    else
        std::for_each(std::begin(co), std::end(co), print_compiler_feature);
    std::puts("");
}

#define CXX(R) print.cxx##R ? R :
#define CORE(R) if (print.cxx##R) std::for_each( \
    std::begin(cxx##R##_core), std::end(cxx##R##_core), add);
#define LIB(R) if (print.cxx##R) std::for_each( \
    std::begin(cxx##R##_lib), std::end(cxx##R##_lib), add);
#define PCORE(R) if (print.cxx##R and print.core_features) \
    show("C++"#R " CORE", cxx##R##_core);
#define PLIB(R) if (print.cxx##R and print.lib_features ) \
    show("C++"#R " LIB" , cxx##R##_lib);

inline void show_latest()
{
    auto latest_rev = []() -> int
    {
        return CXX(32) CXX(29) CXX(26) CXX(23) CXX(20) CXX(17) CXX(14) CXX(11) 98;
    };
    std::vector<CompilerFeature> latest;
    auto add = [&latest](CompilerFeature x)
    {
        auto i = std::lower_bound(latest.begin(), latest.end(), x);
        if (i == latest.end() or not (*i == x))
            latest.insert(i, x);
        else if (i->data() < x.data())
            i->data(x.data());
    };
    char text[64];
    latest.reserve(1024); // max macros
    if (print.core_features)
    {   // preserve reverse revision insertion order!
        CORE(32) CORE(29) CORE(26) CORE(23) CORE(20) CORE(17) CORE(14) CORE(11) CORE(98)
        std::snprintf(text, sizeof text, "ALL CORE MACROS UP TO C++%02i", latest_rev());
        show(text, latest);
    }
    latest.clear();
    if (print.lib_features)
    {   // preserve reverse revision insertion order!
        LIB(32) LIB(29) LIB(26) LIB(23) LIB(20) LIB(17) LIB(14)
        std::snprintf(text, sizeof text, "ALL LIB MACROS UP TO C++%02i", latest_rev());
        show(text, latest);
    }
}

int main()
{
    if (print.separated_revisions)
    {
        PCORE(98) PCORE(11) PCORE(14) PLIB(14) PCORE(17) PLIB(17) PCORE(20) PLIB(20)
        PCORE(23) PLIB(23) PCORE(26) PLIB(26) PCORE(29) PLIB(29) PCORE(32) PLIB(32)
    }
    if (print.latest_revisions) show_latest();
    if (print.attributes) show("ATTRIBUTES", attributes);
    if (print.compiler_specific) show_compiler_specific_info();
}

Возможный вывод:

C++11 CORE (20/20)
__cpp_alias_templates                         2007-04  =  2007-04
__cpp_attributes                              2008-09  =  2008-09
__cpp_constexpr                               2022-11  >  2007-04
__cpp_constexpr_in_decltype                   2017-11  =  2017-11
... truncated ...

C++14 CORE (9/9)
__cpp_aggregate_nsdmi                         2013-04  =  2013-04
__cpp_binary_literals                         2013-04  =  2013-04
__cpp_constexpr                               2022-11  >  2013-04
... truncated ...

C++14 LIB (20/20)
__cpp_lib_chrono_udls                         2013-04  =  2013-04
__cpp_lib_complex_udls                        2013-09  =  2013-09
__cpp_lib_exchange_function                   2013-04  =  2013-04
... truncated ...

... truncated ...

C++23 LIB (43/64)
__cpp_lib_adaptor_iterator_pair_constructor   2021-06  =  2021-06
__cpp_lib_algorithm_iterator_requirements     -------  <  2022-07
__cpp_lib_allocate_at_least                   -------  <  2023-02
__cpp_lib_associative_heterogeneous_erasure   -------  <  2021-10
__cpp_lib_barrier                             2019-07  <  2023-02
... truncated ...

ALL CORE MACROS UP TO C++26 (60/76)
__cpp_aggregate_bases                         2016-03  =  2016-03
__cpp_aggregate_nsdmi                         2013-04  =  2013-04
__cpp_aggregate_paren_init                    2019-02  =  2019-02
__cpp_alias_templates                         2007-04  =  2007-04
... truncated ...

ALL LIB MACROS UP TO C++26 (158/255)
__cpp_lib_adaptor_iterator_pair_constructor   2021-06  =  2021-06
__cpp_lib_addressof_constexpr                 2016-03  =  2016-03
__cpp_lib_algorithm_iterator_requirements     -------  <  2022-07
__cpp_lib_allocate_at_least                   -------  <  2023-02
__cpp_lib_allocator_traits_is_always_equal    2014-11  =  2014-11
... truncated ...

ATTRIBUTES (9/11)
assume                                        2022-07  =  2022-07
carries_dependency                            -------  <  2008-09
deprecated                                    2013-09  =  2013-09
fallthrough                                   2016-03  =  2016-03
... truncated ...

Compiler specific macros:
__cplusplus                                   202302L
__GNUG__                                      14
__GNUC_MINOR__                                2
__GNUC_PATCHLEVEL__                           0

Отчёты о дефектах

Следующие отчёты о дефектах, изменяющие поведение, были применены ретроактивно к ранее опубликованным стандартам C++.

DR Применён к Поведение, опубликованное как Корректное поведение
P2552R3 C++20 __has_cpp_attribute должен раскрываться в ненулевое значение для стандартных атрибутов может раскрываться в 0

См. также

Макросы проверки возможностей библиотеки (C++20) определены в заголовке <version>
Предопределённые макросы
Указатель макросов

Внешние ссылки

1.  Официальный документ о рекомендациях по проверке возможностей
2.  Исходный код для дампа возможностей компилятора