Feature testing (since C++20)
La norme définit un ensemble de macros de préprocesseur correspondant aux fonctionnalités du langage C++ et de la bibliothèque introduites dans C++11 ou ultérieur. Elles sont conçues comme un moyen simple et portable de détecter la présence desdites fonctionnalités.
Table des matières |
Attributs
__has_cpp_attribute(
attribute-token
)
|
|||||||||
Vérifie la prise en charge d'un attribut nommé par attribute-token (après expansion des macros).
Pour chaque attribut standard, il est défini par l'implémentation si
__has_cpp_attribute
s'étend à la valeur donnée dans le tableau ci-dessous (qui correspond à l'année et au mois où l'attribut a été ajouté au brouillon de travail) ou à
0
. Il s'étendra à la valeur donnée dans le tableau si et seulement si l'attribut standard amène l'implémentation à se comporter comme recommandé (émettre des messages de diagnostic, affecter la disposition des classes, etc.).
La présence d'attributs spécifiques au fournisseur est déterminée par une valeur non nulle.
__has_cpp_attribute
peut être développé dans l'expression de
#if
et
#elif
.
Il est traité comme une macro définie par
#ifdef
,
#ifndef
,
#elifdef
,
#elifndef
(depuis C++23)
et
defined
mais ne peut être utilisé nulle part ailleurs.
| attribute-token | Attribut | Valeur | Std | Document(s) |
|---|---|---|---|---|
assume
|
[[
assume
]]
|
202207L
|
(C++23) | P1774R8 |
carries_dependency
|
[[
carries_dependency
]]
|
200809L
|
(C++11)
(jusqu'à 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
]]
avec raison
|
201907L
|
(C++20) | P1301R4 | |
noreturn
|
[[
noreturn
]]
|
200809L
|
(C++11) | N2761 |
unlikely
|
[[
unlikely
]]
|
201803L
|
(C++20) | P0479R5 |
| Nombre total d'attributs : 11 | ||||
Fonctionnalités du langage
Les macros suivantes peuvent être utilisées pour détecter si une fonctionnalité du langage est implémentée par l'implémentation actuelle. Elles sont prédéfinies dans chaque unité de traduction.
Chaque macro se développe en un littéral entier correspondant à l'année et au mois où la fonctionnalité correspondante a été incluse dans l'avant-projet de travail. Lorsqu'une fonctionnalité change significativement, la macro sera mise à jour en conséquence.
| Nombre de la macro | Fonctionnalité | Valeur | Std | Document(s) |
|---|---|---|---|---|
__cpp_aggregate_
bases
|
Classes agrégées avec classes de base |
201603L
|
(C++17) | P0017R1 |
__cpp_aggregate_
nsdmi
|
Classes agrégées avec initialiseurs de membres par défaut |
201304L
|
(C++14) | N3653 |
__cpp_aggregate_
paren_init
|
Initialisation d'agrégat sous la forme d' initialisation directe |
201902L
|
(C++20) | P0960R3 |
__cpp_alias_templates
|
Modèles d'alias |
200704L
|
(C++11) | N2258 |
__cpp_aligned_new
|
Allocation dynamique de mémoire pour les données sur-alignées |
201606L
|
(C++17) | P0035R4 |
__cpp_attributes
|
Attributs |
200809L
|
(C++11) | N2761 |
__cpp_auto_cast
|
auto ( x ) et auto { x } |
202110L
|
(C++23) | P0849R8 |
__cpp_binary_literals
|
Littéraux binaires |
201304L
|
(C++14) | N3472 |
__cpp_capture_star_
this
|
Capture lambda de * this par valeur comme [ = , * this ] |
201603L
|
(C++17) | P0018R3 |
__cpp_char8_t
|
char8_t |
201811L
|
(C++20) | P0482R6 |
| char8_t correctif de compatibilité et de portabilité (autorise l'initialisation des tableaux de (unsigned) char à partir de littéraux de chaîne UTF-8 ) |
202207L
|
(C++23)
(DR20) |
P2513R4 | |
__cpp_concepts
|
Concepts |
201907L
|
(C++20) |
P0734R0
P1084R2 P1452R2 |
| Fonctions membres spéciales triviales conditionnelles |
202002L
|
P0848R3
P2493R0 |
||
__cpp_conditional_
explicit
|
explicit(bool)
|
201806L
|
(C++20) | P0892R2 |
__cpp_consteval
|
Fonctions immédiates |
201811L
|
(C++20) | P1073R3 |
| Faire consteval se propager vers le haut |
202211L
|
(C++23)
(DR20) |
P2564R3 | |
__cpp_constexpr
|
constexpr |
200704L
|
(C++11) | N2235 |
Relaxation
constexpr
,
méthodes
const
constexpr
non-
|
201304L
|
(C++14) | N3652 | |
| Lambda constexpr |
201603L
|
(C++17) | P0170R1 | |
Fonction virtuelle
appels dans les expressions constantes ;
try
blocs
dans les fonctions
constexpr
,
dynamic_cast
et polymorphique
typeid
dans les expressions constantes ; initialisation par défaut triviale
initialisation par défaut
et
déclaration asm
dans les fonctions
constexpr
|
201907L
|
(C++20) |
P1064R0
P1002R1 P1327R1 P1331R2 P1668R1 |
|
| Modification du membre actif d'une union lors d'une évaluation constante |
202002L
|
P1330R0
P2493R0 |
||
| Variables non- littérales , étiquettes et goto dans les fonctions constexpr |
202110L
|
(C++23) | P2242R3 | |
| Assouplissement de certaines restrictions sur les constexpr fonctions et modèles de fonctions |
202207L
|
P2448R2 | ||
| Autoriser les variables statiques constexpr dans les fonctions constexpr |
202211L
|
P2647R1 | ||
| Conversion constexpr de void * : vers l'effacement de type constexpr |
202306L
|
(C++26) | P2738R1 | |
| constexpr placement new |
202406L
|
P2747R2 | ||
__cpp_constexpr_
dynamic_alloc
|
Opérations pour la durée de stockage dynamique dans les fonctions constexpr |
201907L
|
(C++20) | P0784R7 |
__cpp_constexpr_
exceptions
|
constexpr exceptions : [1] , [2] |
202411L
|
(C++26) | P3068R6 |
__cpp_constexpr_
in_decltype
|
Génération de définitions de fonctions et de variables lorsqu' nécessaires pour l'évaluation constante |
201711L
|
(C++20)
(DR11) |
P0859R0 |
__cpp_constinit
|
constinit |
201907L
|
(C++20) | P1143R2 |
__cpp_contracts
|
Contrats |
202502L
|
(C++26) | P2900R14 |
__cpp_decltype
|
decltype |
200707L
|
(C++11) | N2343 |
__cpp_decltype_auto
|
Déduction du type de retour pour les fonctions normales |
201304L
|
(C++14) | N3638 |
__cpp_deduction_
guides
|
Déduction d'arguments de modèle pour les modèles de classe (CTAD) |
201703L
|
(C++17) |
P0091R3
P0512R0 P0620R0 |
| CTAD pour les agrégats et les alias |
201907L
|
(C++20) |
P1814R0
P1816R0 |
|
__cpp_delegating_
constructors
|
Constructeurs délégués |
200604L
|
(C++11) | N1986 |
__cpp_deleted_function
|
Fonctions supprimées avec messages ( = delete ( "should have a reason" ) ; ) |
202403L
|
(C++26) | P2573R2 |
__cpp_designated_
initializers
|
Initialisateurs désignés |
201707L
|
(C++20) | P0329R4 |
__cpp_enumerator_
attributes
|
Attributs pour les énumérateurs |
201411L
|
(C++17) | N4266 |
__cpp_explicit_this_
parameter
|
Paramètre objet explicite |
202110L
|
(C++23) | P0847R7 |
__cpp_fold_expressions
|
Expressions de repli |
201603L
|
(C++17) |
N4295
P0036R0 |
| Ordonnancement des contraintes impliquant des expressions de repli |
202406L
|
(C++26) | P2963R3 | |
__cpp_generic_lambdas
|
Expressions lambda génériques |
201304L
|
(C++14) | N3649 |
| Liste de paramètres de template explicite pour les lambdas génériques |
201707L
|
(C++20) | P0428R2 | |
__cpp_guaranteed_
copy_elision
|
Élimination garantie de la copie via les catégories de valeur simplifiées |
201606L
|
(C++17) | P0135R1 |
__cpp_hex_float
|
Littéraux flottants hexadécimaux |
201603L
|
(C++17) | P0245R1 |
__cpp_if_consteval
|
if consteval
|
202106L
|
(C++23) | P1938R3 |
__cpp_if_constexpr
|
if constexpr
|
201606L
|
(C++17) | P0292R2 |
__cpp_impl_coroutine
|
Coroutines (support du compilateur) |
201902L
|
(C++20) |
P0912R5
LWG3393 |
__cpp_impl_destroying_
delete
|
Suppression destructrice
operator delete
(support du compilateur)
|
201806L
|
(C++20) | P0722R3 |
__cpp_impl_three_
way_comparison
|
Comparaison à trois voies (support du compilateur) |
201907L
|
(C++20) |
P0515R3
P0768R1 P1185R2 P1630R1 |
__cpp_implicit_move
|
Déplacement implicite simplifié déplacement implicite |
202207L
|
(C++23) | P2266R3 |
__cpp_inheriting_
constructors
|
Constructeurs hérités |
200802L
|
(C++11) | N2540 |
| Reformulation des constructeurs hérités : Nouvelle spécification pour les constructeurs hérités ( DR1941 et al) |
201511L
|
(C++17)
(DR11) |
P0136R1 | |
__cpp_init_captures
|
Capture d'initialisation lambda |
201304L
|
(C++14) | N3648 |
| Autoriser l'expansion de pack dans lambda init-capture |
201803L
|
(C++20) | P0780R2 | |
__cpp_initializer_
lists
|
Initialisation par liste et std::initializer_list |
200806L
|
(C++11) | N2672 |
__cpp_inline_variables
|
Variables inline |
201606L
|
(C++17) | P0386R2 |
__cpp_lambdas
|
Expressions lambda |
200907L
|
(C++11) | N2927 |
__cpp_modules
|
Modules |
201907L
|
(C++20) |
P1103R3
P1811R0 |
__cpp_multidimensional_
subscript
|
Opérateur d'indice multidimensionnel |
202110L
|
(C++23) | P2128R6 |
| Statique operator[] |
202211L
|
P2589R1 | ||
__cpp_named_character_
escapes
|
Échappements de caractères universels nommés |
202207L
|
(C++23) | P2071R2 |
__cpp_namespace_
attributes
|
Attributs pour les espaces de noms |
201411L
|
(C++17) | N4266 |
__cpp_noexcept_function_
type
|
Rendre les spécifications d'exception partie du système de types |
201510L
|
(C++17) | P0012R1 |
__cpp_nontype_template_
args
|
Permettre l'évaluation constante pour tous les arguments de template constants |
201411L
|
(C++17) | N4268 |
| Types de classe et types à virgule flottante dans les paramètres de template constants |
201911L
|
(C++20) | P1907R1 | |
__cpp_nontype_template_
parameter_auto
|
Déclaration de paramètre de template constant avec auto |
201606L
|
(C++17) | P0127R2 |
__cpp_nsdmi
|
Initialiseurs de membres de données non statiques |
200809L
|
(C++11) | N2756 |
__cpp_pack_indexing
|
Indexation de paquets |
202311L
|
(C++26) | P2662R3 |
__cpp_placeholder_
variables
|
Un joli espace réservé sans nom |
202306L
|
(C++26) | P2169R4 |
__cpp_pp_embed
|
#embed |
202502L
|
(C++26) | P1967R14 |
__cpp_range_based_
for
|
Boucle
for
basée sur une plage
|
200907L
|
(C++11) | N2930 |
Boucle
for
basée sur des intervalles avec des types
begin
/
end
différents
|
201603L
|
(C++17) | P0184R0 | |
| Extension de durée de vie dans la boucle for basée sur des intervalles |
202211L
|
(C++23) |
P2644R1
P2718R0 CWG2659 |
|
__cpp_raw_strings
|
Littéraux de chaîne bruts |
200710L
|
(C++11) | N2442 |
__cpp_ref_qualifiers
|
qualificateurs de référence |
200710L
|
(C++11) | N2439 |
__cpp_return_type_
deduction
|
Déduction du type de retour pour les fonctions normales |
201304L
|
(C++14) | N3638 |
__cpp_rvalue_references
|
Référence rvalue |
200610L
|
(C++11) | N2118 |
__cpp_size_t_suffix
|
Suffixes littéraux pour
std::size_t
et sa version signée
|
202011L
|
(C++23) | P0330R8 |
__cpp_sized_deallocation
|
Désallocation dimensionnée |
201309L
|
(C++14) | N3778 |
__cpp_static_assert
|
static_assert |
200410L
|
(C++11) | N1720 |
Assertion statique à un seul argument
static_assert
|
201411L
|
(C++17) | N3928 | |
Messages
static_assert
générés par l'utilisateur
|
202306L
|
(C++26) | P2741R3 | |
__cpp_static_call_
operator
|
Opérateur operator() statique |
202207L
|
(C++23) | P1169R4 |
__cpp_structured_
bindings
|
Liaisons structurées |
201606L
|
(C++17) | P0217R3 |
| Attributs pour liaison structurée |
202403L
|
(C++26) | P0609R3 | |
| Liaisons structurées déclaration comme condition |
202406L
|
P0963R3 | ||
| Liaisons structurées peuvent introduire un pack |
202411L
|
P1061R10 | ||
__cpp_template_parameters
|
Paramètres de template de concepts et de templates variables |
202502L
|
(C++26) | P2841R7 |
__cpp_template_template_
args
|
Correspondance des arguments template template |
201611L
|
(C++17) | P0522R0 |
__cpp_threadsafe_
static_init
|
Initialisation dynamique et destruction avec concurrence |
200806L
|
(C++11) | N2660 |
__cpp_trivial_relocatability
|
Déplacement trivial |
202502L
|
(C++26) | P2786R13 |
__cpp_trivial_union
|
Unions triviaux |
202502L
|
(C++26) | P3074R7 |
__cpp_unicode_characters
|
Nouveaux types de caractères ( char16_t et char32_t ) |
200704L
|
(C++11) | N2249 |
__cpp_unicode_literals
|
Littéraux de chaîne Unicode |
200710L
|
(C++11) | N2442 |
__cpp_user_defined_
literals
|
Littéraux définis par l'utilisateur |
200809L
|
(C++11) | N2765 |
__cpp_using_enum
|
using enum |
201907L
|
(C++20) | P1099R5 |
__cpp_variable_templates
|
Modèles de variables |
201304L
|
(C++14) | N3651 |
__cpp_variadic_friend
|
Déclarations friend variadiques |
202403L
|
(C++26) | P2893R3 |
__cpp_variadic_templates
|
Modèles variadiques |
200704L
|
(C++11) | N2242 |
__cpp_variadic_using
|
Développements de paquets dans les
using
-déclarations
|
201611L
|
(C++17) | P0195R2 |
| Nombre total de macros : 76 | ||||
Fonctionnalités de la bibliothèque
Les macros suivantes peuvent être utilisées pour détecter si une fonctionnalité de la bibliothèque standard est implémentée par l'implémentation actuelle. Contrairement aux macros de test des fonctionnalités du langage, elles ne sont pas prédéfinies. Elles sont fournies par l'en-tête <version> .
Pour chaque macro de test de fonctionnalité de bibliothèque, elle est également fournie par les en-têtes qui fournissent les composants pertinents de la bibliothèque standard. Voir les macros de test de fonctionnalité de bibliothèque pour une liste complète des en-têtes fournissant ces macros.
Chaque macro se développe en un littéral entier correspondant à l'année et au mois où la fonctionnalité correspondante a été incluse dans l'avant-projet de travail. Lorsqu'une fonctionnalité change significativement, la macro sera mise à jour en conséquence.
| Nombre de la macro | Fonctionnalité | Valeur | Std | Document(s) |
|---|---|---|---|---|
__cpp_lib_adaptor_
iterator_pair_constructor
|
Constructeurs de paire d'itérateurs pour std::stack et std::queue |
202106L
|
(C++23) | P1425R4 |
__cpp_lib_addressof_
constexpr
|
Constexpr std::addressof |
201603L
|
(C++17) | LWG2296 |
__cpp_lib_algorithm_
default_value_type
|
Activation de l' initialisation par liste pour les algorithmes |
202403L
|
(C++26) |
P2248R8
P3217R0 |
__cpp_lib_algorithm_
iterator_requirements
|
Itérateurs de plages comme entrées aux algorithmes non-plages |
202207L
|
(C++23) | P2408R5 |
__cpp_lib_aligned_
accessor
|
std::aligned_accessor : un accesseur std::mdspan exprimant le sur-alignement de pointeur |
202411L
|
(C++26) | P2897R7 |
__cpp_lib_allocate_
at_least
|
Rétroaction de taille dans l'interface d'allocateur, par exemple : std::allocator::allocate_at_least , std::allocator_traits::allocate_at_least |
202302L
|
(C++23) |
P0401R6
P2652R2 LWG3887 |
__cpp_lib_allocator_
traits_is_always_equal
|
std::allocator_traits::is_always_equal , noexcept nettoyages |
201411L
|
(C++17) | N4258 |
__cpp_lib_any
|
std::any |
201606L
|
(C++17) |
P0220R1
P0032R3 |
__cpp_lib_apply
|
std::apply |
201603L
|
(C++17) | P0220R1 |
__cpp_lib_array_
constexpr
|
Constexpr pour std::reverse_iterator , std::move_iterator , std::array et accès aux intervalles |
201603L
|
(C++17) | P0031R0 |
| ConstexprIterator ; constexpr comparaison pour std::array ; divers éléments constexpr ( std::array::fill et al.) |
201811L
|
(C++20) |
P0858R0
LWG3257 P1023R0 P1032R1 |
|
__cpp_lib_as_const
|
std::as_const |
201510L
|
(C++17) | P0007R1 |
__cpp_lib_associative_
heterogeneous_erasure
|
Effacement hétérogène dans les conteneurs associatifs et les conteneurs associatifs non ordonnés |
202110L
|
(C++23) | P2077R3 |
__cpp_lib_associative_
heterogeneous_insertion
|
Surcharges hétérogènes pour les fonctions membres restantes dans les conteneurs associatifs ordonnés et les conteneurs associatifs non ordonnés |
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
|
Atome flottant |
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
|
Types entiers atomiques sans verrouillage ( std::atomic_signed_lock_free , std::atomic_unsigned_lock_free ) |
201907L
|
(C++20) | P1135R6 |
__cpp_lib_atomic_
min_max
|
Minimum/Maximum atomique ( std::atomic::fetch_min , std::atomic::fetch_max , etc.) |
202403L
|
(C++26) | P0493R5 |
__cpp_lib_atomic_
ref
|
std::atomic_ref |
201806L
|
(C++20) | P0019R8 |
| std::atomic_ref::address() |
202411L
|
(C++26) | P2835R7 | |
__cpp_lib_atomic_
shared_ptr
|
std::atomic<std::shared_ptr> |
201711L
|
(C++20) | P0718R2 |
__cpp_lib_atomic_
value_initialization
|
Correction de l'initialisation atomique (initialisation par défaut std::atomic par valeur) |
201911L
|
(C++20) | P0883R2 |
__cpp_lib_atomic_
wait
|
Attente efficace pour std::atomic |
201907L
|
(C++20) | P1135R6 |
__cpp_lib_barrier
|
std::barrier |
201907L
|
(C++20) | P1135R6 |
| std::barrier garanties de complétion de phase |
202302L
|
(C++23) | P2588R3 | |
__cpp_lib_bind_back
|
std::bind_back |
202202L
|
(C++23) | P2387R3 |
| Permettre de passer des objets appelables comme arguments de template constants à std::bind_back |
202306L
|
(C++26) | P2714R1 | |
__cpp_lib_bind_front
|
std::bind_front |
201907L
|
(C++20) |
P0356R5
P1651R0 |
| Permettre de passer des objets appelables comme arguments de modèle constants à std::bind_front |
202306L
|
(C++26) | P2714R1 | |
__cpp_lib_bit_cast
|
std::bit_cast |
201806L
|
(C++20) | P0476R2 |
__cpp_lib_bitops
|
Opérations binaires |
201907L
|
(C++20) | P0553R4 |
__cpp_lib_bitset
|
Interface std::bitset avec 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
|
Searchers |
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
|
Prise en charge de la bibliothèque pour
char8_t
|
201907L
|
(C++20) |
P0482R6
P1423R3 |
__cpp_lib_chrono
|
Fonctions d'arrondi pour std::chrono::duration et std::chrono::time_point |
201510L
|
(C++17) | P0092R1 |
| Constexpr pour toutes les fonctions membres de std::chrono::duration et std::chrono::time_point |
201611L
|
P0505R0 | ||
| Calendriers et Fuseaux horaires |
201907L
|
(C++20) |
P0355R7
P1466R3 |
|
| Prise en charge du hachage pour les classes de valeur std::chrono |
202306L
|
(C++26) | P2592R3 | |
__cpp_lib_chrono_
udls
|
Littéraux définis par l'utilisateur pour les types temporels |
201304L
|
(C++14) | N3642 |
__cpp_lib_clamp
|
std::clamp |
201603L
|
(C++17) | P0025R1 |
__cpp_lib_common_
reference
|
Rendre std::common_reference_t de std::reference_wrapper un type référence |
202302L
|
(C++23) | P2655R3 |
__cpp_lib_common_
reference_wrapper
|
Rendre std::common_reference_t de std::reference_wrapper un type référence |
202302L
|
(C++23) | P2655R3 |
__cpp_lib_complex_
udls
|
Littéraux définis par l'utilisateur pour
std::complex
|
201309L
|
(C++14) | N3779 |
__cpp_lib_concepts
|
Concepts de la bibliothèque standard |
202002L
|
(C++20) |
P0898R3
P1754R1 P1964R2 |
Types uniquement déplaçables pour
equality_comparable_with
,
totally_ordered_with
, et
three_way_comparable_with
|
202207L
|
(C++23) | P2404R3 | |
__cpp_lib_constexpr_
algorithms
|
Constexpr pour les algorithmes |
201806L
|
(C++20) |
P0202R3
P0879R0 LWG3256 LWG3792 |
| Tri stable constexpr |
202306L
|
(C++26) | P2562R1 | |
__cpp_lib_constexpr_
atomic
|
constexpr std::atomic et std::atomic_ref |
202411L
|
(C++26) | P3309R3 |
__cpp_lib_constexpr_
bitset
|
Un constexpr std::bitset plus étendu |
202207L
|
(C++23) | P2417R2 |
__cpp_lib_constexpr_
charconv
|
Constexpr pour std::to_chars et std::from_chars pour les types entiers |
202207L
|
(C++23) | P2291R3 |
__cpp_lib_constexpr_
cmath
|
Constexpr pour les fonctions mathématiques dans <cmath> et <cstdlib> |
202202L
|
(C++23) | P0533R9 |
| Davantage de constexpr pour <cmath> |
202306L
|
(C++26) | P1383R2 | |
__cpp_lib_constexpr_
complex
|
Constexpr pour std::complex |
201711L
|
(C++20) | P0415R1 |
| Plus de constexpr pour <complex> |
202306L
|
(C++26) | P1383R2 | |
__cpp_lib_constexpr_
deque
|
constexpr std::deque |
202502L
|
(C++26) | P3372R3 |
__cpp_lib_constexpr_
dynamic_alloc
|
Constexpr pour std::allocator et les utilitaires associés |
201907L
|
(C++20) | P0784R7 |
__cpp_lib_constexpr_
exceptions
|
constexpr pour les types d'exception, par ex. std::bad_alloc , std::bad_cast etc. |
202411L
|
(C++26) | P3068R6 |
| Plus de constexpr pour les types d'exception |
202502L
|
P3378R2 | ||
__cpp_lib_constexpr_
flat_map
|
constexpr std::flat_map et std::flat_multimap |
202502L
|
(C++26) | P3372R3 |
__cpp_lib_constexpr_
flat_set
|
constexpr std::flat_set et std::flat_multiset |
202502L
|
(C++26) | P3372R3 |
__cpp_lib_constexpr_
forward_list
|
constexpr std::forward_list |
202502L
|
(C++26) | P3372R3 |
__cpp_lib_constexpr_
functional
|
Bits divers (
constexpr
) (
std::default_searcher
);
constexpr
INVOKE
|
201907L
|
(C++20) |
P1032R1
P1065R2 |
__cpp_lib_constexpr_
inplace_vector
|
constexpr std::inplace_vector pour les types non triviaux |
202502L
|
(C++26) | P3074R7 |
__cpp_lib_constexpr_
iterator
|
Divers constexpr éléments ( std::insert_iterator et al.) |
201811L
|
(C++20) | P1032R1 |
__cpp_lib_constexpr_
list
|
constexpr std::list |
202502L
|
(C++26) | P3372R3 |
__cpp_lib_constexpr_
map
|
constexpr std::map et std::multimap |
202502L
|
(C++26) | P3372R3 |
__cpp_lib_constexpr_
memory
|
Constexpr dans std::pointer_traits |
201811L
|
(C++20) | P1006R1 |
| Constexpr std::unique_ptr |
202202L
|
(C++23) | P2273R3 | |
__cpp_lib_constexpr_
new
|
Nouveau placement constexpr new |
202406L
|
(C++26) | P2747R2 |
__cpp_lib_constexpr_
numeric
|
Constexpr pour les algorithmes dans <numeric> |
201911L
|
(C++20) | P1645R1 |
__cpp_lib_constexpr_
queue
|
constexpr std::queue |
202502L
|
(C++26) | P3372R3 |
__cpp_lib_constexpr_
set
|
constexpr std::set et std::multiset |
202502L
|
(C++26) | P3372R3 |
__cpp_lib_constexpr_
stack
|
constexpr std::stack |
202502L
|
(C++26) | P3372R3 |
__cpp_lib_constexpr_
string
|
constexpr std::char_traits |
201611L
|
(C++17) | P0426R1 |
| constexpr std::string |
201907L
|
(C++20) | P0980R1 | |
__cpp_lib_constexpr_
string_view
|
Bits divers constexpr ( std::string_view::copy ) |
201811L
|
(C++20) | P1032R1 |
__cpp_lib_constexpr_
tuple
|
Divers constexpr éléments ( std::tuple::operator= et al.) |
201811L
|
(C++20) | P1032R1 |
__cpp_lib_constexpr_
typeinfo
|
Constexpr pour std::type_info::operator== |
202106L
|
(C++23) | P1328R1 |
__cpp_lib_constexpr_
unordered_map
|
constexpr std::unordered_map et std::unordered_multimap |
202502L
|
(C++26) | P3372R3 |
__cpp_lib_constexpr_
unordered_set
|
constexpr std::unordered_set et std::unordered_multiset |
202502L
|
(C++26) | P3372R3 |
__cpp_lib_constexpr_
utility
|
Bits divers constexpr ( std::pair::operator= et al.) |
201811L
|
(C++20) | P1032R1 |
__cpp_lib_constexpr_
vector
|
Constexpr pour std::vector |
201907L
|
(C++20) | P1004R2 |
__cpp_lib_constrained_
equality
|
Opérateurs relationnels contraints pour std::pair , std::tuple , std::optional , et std::variant |
202403L
|
(C++26) | P2944R3 |
| Contrainte des std::expected opérateurs d'égalité |
202411L
|
P3379R0 | ||
__cpp_lib_containers_
ranges
|
Construction et insertion compatibles avec les gammes pour les conteneurs et les chaînes |
202202L
|
(C++23) | P1206R7 |
__cpp_lib_contracts
|
<contracts> : Support des contrats |
202502L
|
(C++26) | P2900R14 |
__cpp_lib_copyable_
function
|
std::copyable_function |
202306L
|
(C++26) | P2548R6 |
__cpp_lib_coroutine
|
Coroutines (support de la bibliothèque) |
201902L
|
(C++20) |
P0912R5
LWG3393 |
__cpp_lib_debugging
|
<debugging> : Support de débogage |
202311L
|
(C++26) | P2546R5 |
| Remplaçable std::is_debugger_present |
202403L
|
P2810R4 | ||
__cpp_lib_destroying_
delete
|
Suppression destructive operator delete (support de la bibliothèque) |
201806L
|
(C++20) | P0722R3 |
__cpp_lib_enable_
shared_from_this
|
std::enable_shared_from_this::weak_from_this |
201603L
|
(C++17) | P0033R1 |
__cpp_lib_endian
|
std::endian |
201907L
|
(C++20) |
P0463R1
P1612R1 |
__cpp_lib_erase_
if
|
Élimination uniforme des conteneurs |
202002L
|
(C++20) |
P1209R0
P1115R3 |
__cpp_lib_exchange_
function
|
std::exchange |
201304L
|
(C++14) | N3668 |
__cpp_lib_execution
|
Politiques d'exécution |
201603L
|
(C++17) | P0024R2 |
| std::execution::unsequenced_policy |
201902L
|
(C++20) | P1001R2 | |
__cpp_lib_expected
|
modèle de classe std::expected |
202202L
|
(C++23) | P0323R12 |
| Fonctions monadiques pour std::expected |
202211L
|
P2505R5 | ||
__cpp_lib_filesystem
|
Bibliothèque de système de fichiers |
201703L
|
(C++17) |
P0218R1
P0219R1 P0392R0 P0317R1 |
__cpp_lib_flat_map
|
std::flat_map et std::flat_multimap |
202207L
|
(C++23) | P0429R9 |
__cpp_lib_flat_set
|
std::flat_set et std::flat_multiset |
202207L
|
(C++23) |
P1222R4
LWG3751 |
__cpp_lib_format
|
Formatage de texte |
201907L
|
(C++20) |
P0645R10
P1361R2 P1652R1 |
| Vérifications de chaîne de format à la compilation ; Réduction de la paramétrisation de std::vformat_to |
202106L
|
(C++23)
(DR20) |
P2216R3 | |
| Correction de la gestion des paramètres régionaux dans les formateurs chrono ; Prise en charge des types non const-formattables |
202110L
|
P2372R3
P2418R2 |
||
| Exposition de std::basic_format_string ; clarification du traitement des encodages dans le formatage localisé des types chrono |
202207L
|
(C++23) |
P2419R2
P2508R1 |
|
| Formatage des pointeurs |
202304L
|
(C++26) | P2510R3 | |
| Format de vérification de type des arguments |
202305L
|
P2757R3 | ||
| Membre visit |
202306L
|
P2637R3 | ||
| Chaînes de formatage à l'exécution |
202311L
|
P2918R2 | ||
__cpp_lib_format_
path
|
Formatage de std::filesystem::path |
202403L
|
(C++26) | P2845R8 |
__cpp_lib_format_
ranges
|
Formatage des plages |
202207L
|
(C++23) |
P2286R8
P2585R1 LWG3750 |
__cpp_lib_format_
uchar
|
Correction du formatage des unités de code en tant qu'entiers |
202311L
|
(C++26) | P2909R4 |
__cpp_lib_formatters
|
Formatage std::thread::id et std::stacktrace |
202302L
|
(C++23) | P2693R1 |
__cpp_lib_forward_
like
|
std::forward_like |
202207L
|
(C++23) | P2445R1 |
__cpp_lib_freestanding_
algorithm
|
Fonctionnalités autonomes dans <algorithm> |
202311L
|
(C++26) | P2407R5 |
| Bibliothèque autonome : <algorithm> |
202502L
|
P2976R1 | ||
__cpp_lib_freestanding_
array
|
Rendre certaines parties de std::array autonomes |
202311L
|
(C++26) | P2407R5 |
__cpp_lib_freestanding_
char_traits
|
Autonome std::char_traits |
202306L
|
(C++26) | P2338R4 |
__cpp_lib_freestanding_
charconv
|
Fonctionnalités autonomes dans <charconv> |
202306L
|
(C++26) | P2338R4 |
__cpp_lib_freestanding_
cstdlib
|
Fonctionnalités autonomes dans <cstdlib> |
202306L
|
(C++26) | P2338R4 |
__cpp_lib_freestanding_
cstring
|
Fonctionnalités autonomes dans <cstring> |
202306L
|
(C++26) | P2338R4 |
| Suppression de std::strtok des fonctionnalités autonomes |
202311L
|
P2937R0 | ||
__cpp_lib_freestanding_
cwchar
|
Fonctionnalités autonomes dans <cwchar> |
202306L
|
(C++26) | P2338R4 |
__cpp_lib_freestanding_
errc
|
Freestanding std::errc |
202306L
|
(C++26) | P2338R4 |
__cpp_lib_freestanding_
errc
|
Autonome std::errc |
202306L
|
(C++26) | P2338R4 |
__cpp_lib_freestanding_
execution
|
Bibliothèque autonome : <execution> |
202502L
|
(C++26) | P2976R1 |
__cpp_lib_freestanding_
expected
|
Rendre certaines parties de std::expected autonomes |
202311L
|
(C++26) | P2833R2 |
__cpp_lib_freestanding_
feature_test_macros
|
Prise en charge des macros de test de fonctionnalités autonomes |
202306L
|
(C++26) | P2198R7 |
__cpp_lib_freestanding_
functional
|
Fonctionnalités autonomes dans <functional> |
202306L
|
(C++26) | P2198R7 |
__cpp_lib_freestanding_
iterator
|
Fonctionnalités autonomes dans <iterator> |
202306L
|
(C++26) | P2198R7 |
__cpp_lib_freestanding_
mdspan
|
Autonome std::mdspan |
202311L
|
(C++26) | P2833R2 |
__cpp_lib_freestanding_
memory
|
Fonctionnalités autonomes dans <memory> |
202306L
|
(C++26) | P2198R7 |
| Bibliothèque Autonome : <memory> |
202502L
|
P2976R1 | ||
__cpp_lib_freestanding_
numeric
|
Fonctionnalités autonomes dans <numeric> (arithmétique de saturation) |
202311L
|
(C++26) | P0543R3 |
| Bibliothèque autonome : <numeric> |
202502L
|
P2976R1 | ||
__cpp_lib_freestanding_
operator_new
|
Définition de operator new (optionnelle dans les implémentations autonomes) |
202306L
|
(C++26) | P2198R7 |
__cpp_lib_freestanding_
optional
|
Rendre certaines parties de std::optional autonomes |
202311L
|
(C++26) | P2407R5 |
__cpp_lib_freestanding_
random
|
Bibliothèque autonome : <random> |
202502L
|
(C++26) | P2976R1 |
__cpp_lib_freestanding_
ranges
|
Fonctionnalités autonomes dans <ranges> |
202306L
|
(C++26) | P2198R7 |
__cpp_lib_freestanding_
ratio
|
Fonctionnalités autonomes dans <ratio> |
202306L
|
(C++26) | P2198R7 |
__cpp_lib_freestanding_
string_view
|
Rendre certaines parties de std::string_view autonomes |
202311L
|
(C++26) | P2407R5 |
__cpp_lib_freestanding_
tuple
|
Fonctionnalités autonomes dans <tuple> |
202306L
|
(C++26) | P2198R7 |
__cpp_lib_freestanding_
utility
|
Fonctionnalités autonomes dans <utility> |
202306L
|
(C++26) | P2198R7 |
__cpp_lib_freestanding_
variant
|
Rendre certaines parties de std::variant autonomes |
202311L
|
(C++26) | P2407R5 |
__cpp_lib_fstream_
native_handle
|
Obtention de handles natifs depuis les flux de fichiers |
202306L
|
(C++26) | P1759R6 |
__cpp_lib_function_
ref
|
std::function_ref : Une référence appelable à effacement de type |
202306L
|
(C++26) | P0792R14 |
__cpp_lib_gcd_lcm
|
std::gcd , std::lcm |
201606L
|
(C++17) | P0295R0 |
__cpp_lib_generator
|
std::generator : Générateur de coroutine synchrone pour les plages |
202207L
|
(C++23) | P2502R2 |
__cpp_lib_generic_
associative_lookup
|
Recherche de comparaison hétérogène dans les conteneurs associatifs |
201304L
|
(C++14) | N3657 |
__cpp_lib_generic_
unordered_lookup
|
Recherche de comparaison hétérogène dans les conteneurs associatifs non ordonnés |
201811L
|
(C++20) | P0919R3 |
__cpp_lib_hardened_
array
|
Durcissement de la bibliothèque standard (présent uniquement dans l'implémentation durcie) |
202502L
|
(C++26) | P3471R4 |
__cpp_lib_hardened_
basic_string
|
Durcissement de la bibliothèque standard (présent uniquement dans l'implémentation durcie) |
202502L
|
(C++26) | P3471R4 |
__cpp_lib_hardened_
basic_string_view
|
Durcissement de la bibliothèque standard (présent uniquement dans l'implémentation durcie) |
202502L
|
(C++26) | P3471R4 |
__cpp_lib_hardened_
bitset
|
Durcissement de la bibliothèque standard (présent uniquement dans l'implémentation durcie) |
202502L
|
(C++26) | P3471R4 |
__cpp_lib_hardened_
deque
|
Durcissement de la bibliothèque standard (présent uniquement dans l'implémentation durcie) |
202502L
|
(C++26) | P3471R4 |
__cpp_lib_hardened_
expected
|
Durcissement de la bibliothèque standard (présent uniquement dans l'implémentation durcie) |
202502L
|
(C++26) | P3471R4 |
__cpp_lib_hardened_
forward_list
|
Renforcement de la bibliothèque standard (présent uniquement dans l'implémentation renforcée) |
202502L
|
(C++26) | P3471R4 |
__cpp_lib_hardened_
inplace_vector
|
Renforcement de la bibliothèque standard (présent uniquement dans l'implémentation renforcée) |
202502L
|
(C++26) | P3471R4 |
__cpp_lib_hardened_
list
|
Durcissement de la bibliothèque standard (présent uniquement dans l'implémentation durcie) |
202502L
|
(C++26) | P3471R4 |
__cpp_lib_hardened_
mdspan
|
Renforcement de la bibliothèque standard (présent uniquement dans l'implémentation renforcée) |
202502L
|
(C++26) | P3471R4 |
__cpp_lib_hardened_
optional
|
Durcissement de la bibliothèque standard (présent uniquement dans l'implémentation durcie) |
202502L
|
(C++26) | P3471R4 |
__cpp_lib_hardened_
span
|
Renforcement de la bibliothèque standard (présent uniquement dans l'implémentation renforcée) |
202502L
|
(C++26) | P3471R4 |
__cpp_lib_hardened_
valarray
|
Durcissement de la bibliothèque standard (présent uniquement dans l'implémentation durcie) |
202502L
|
(C++26) | P3471R4 |
__cpp_lib_hardened_
vector
|
Durcissement de la bibliothèque standard (présent uniquement dans l'implémentation durcie) |
202502L
|
(C++26) | P3471R4 |
__cpp_lib_hardware_
interference_size
|
Constexpr std::hardware_{constructive, destructive}_interference_size |
201703L
|
(C++17) | P0154R1 |
__cpp_lib_hive
|
<hive> : un conteneur basé sur des buckets qui réutilise les emplacements mémoire des éléments effacés |
202502L
|
(C++26) | P0447R28 |
__cpp_lib_has_unique_
object_representations
|
std::has_unique_object_representations |
201606L
|
(C++17) | P0258R2 |
__cpp_lib_hazard_
pointer
|
<hazard_pointer> : Pointeurs de risque |
202306L
|
(C++26) | P2530R3 |
__cpp_lib_hypot
|
Surcharge à 3 arguments de std::hypot |
201603L
|
(C++17) | P0030R1 |
__cpp_lib_incomplete_
container_elements
|
Support minimal des types incomplets pour std::forward_list , std::list , et std::vector |
201505L
|
(C++17) | N4510 |
__cpp_lib_indirect
|
std::indirect |
202502L
|
(C++26) | P3019R13 |
__cpp_lib_inplace_
vector
|
std::inplace_vector : Vecteur redimensionnable dynamiquement avec capacité fixe (stockage inplace) |
202406L
|
(C++26) | P0843R14 |
__cpp_lib_int_pow2
|
Opérations de puissance de 2 entières ( std::has_single_bit , std::bit_ceil , std::bit_floor , std::bit_width ) |
202002L
|
(C++20) |
P0556R3
P1956R1 |
__cpp_lib_integer_
comparison_functions
|
Fonctions de comparaison d'entiers |
202002L
|
(C++20) | P0586R2 |
__cpp_lib_integer_
sequence
|
Séquences d'entiers à la compilation |
201304L
|
(C++14) | N3658 |
__cpp_lib_integral_
constant_callable
|
std::integral_constant::operator() |
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
|
Prise en charge du mode exclusif pour les fstreams |
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_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
|
Traits d'interconvertibilité des pointeurs : 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_sufficiently_
aligned
|
std::is_sufficiently_aligned : vérifie le précondition d'alignement d'un pointeur |
202411L
|
(C++26) | P2897R7 |
__cpp_lib_is_swappable
|
traits (nothrow-)swappable |
201603L
|
(C++17) | P0185R1 |
__cpp_lib_is_virtual_
base_of
|
std::is_virtual_base_of : Trait de type pour détecter les classes de base virtuelles |
202406L
|
(C++26) | P2985R0 |
__cpp_lib_is_within_
lifetime
|
Vérifier si une alternative d'union est active ( std::is_within_lifetime ) |
202306L
|
(C++26) | P2641R4 |
__cpp_lib_jthread
|
Jeton d'arrêt et Thread joignable |
201911L
|
(C++20) |
P0660R10
P1869R1 |
__cpp_lib_latch
|
std::latch |
201907L
|
(C++20) | P1135R6 |
__cpp_lib_launder
|
Problème CWG 1776 : Remplacement d'objets de classe contenant des membres référence ( std::launder ) |
201606L
|
(C++17) | P0137R1 |
__cpp_lib_linalg
|
Une interface d'algèbre linéaire basée sur les fonctions libres BLAS |
202311L
|
(C++26) | P1673R13 |
__cpp_lib_list_remove_
return_type
|
Modifier le type de retour des fonctions
remove()
,
remove_if()
et
unique()
de
std::forward_list
et
std::list
|
201806L
|
(C++20) | P0646R1 |
__cpp_lib_logical_
traits
|
Opérations logiques sur les traits de type |
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_try_
emplace
|
std::map::try_emplace , std::map::insert_or_assign |
201411L
|
(C++17) | N4279 |
__cpp_lib_math_constants
|
Constantes mathématiques |
201907L
|
(C++20) | P0631R8 |
__cpp_lib_math_special_
functions
|
Fonctions mathématiques spéciales |
201603L
|
(C++17) | P0226R1 |
__cpp_lib_mdspan
|
std::mdspan |
202207L
|
(C++23) |
P0009R18
P2599R2 P2604R0 P2613R1 |
| std::dims pour std::mdspan |
202406L
|
(C++26) | P2389R2 | |
__cpp_lib_memory_
resource
|
std::pmr::memory_resource |
201603L
|
(C++17) | P0220R1 |
__cpp_lib_modules
|
Modules de la bibliothèque standard
std
et
std.compat
|
202207L
|
(C++23) | P2465R3 |
__cpp_lib_move_iterator_
concept
|
Rendre std::move_iterator<T*> un itérateur à accès aléatoire |
202207L
|
(C++23) | P2520R0 |
__cpp_lib_move_only_
function
|
std::move_only_function |
202110L
|
(C++23) | P0288R9 |
__cpp_lib_node_extract
|
Splicage des maps et sets ( std::map::extract , std::map::merge , insert(node_type) , etc) |
201606L
|
(C++17) | P0083R3 |
__cpp_lib_nonmember_
container_access
|
std::size , std::data et std::empty |
201411L
|
(C++17) | N4280 |
__cpp_lib_not_fn
|
std::not_fn |
201603L
|
(C++17) | P0005R4 |
| Permettre de passer des objets appelables comme arguments de modèle constants à std::not_fn |
202306L
|
(C++26) | P2714R1 | |
__cpp_lib_null_iterators
|
Itérateurs nuls LegacyForwardIterator s |
201304L
|
(C++14) | N3644 |
__cpp_lib_optional
|
std::optional |
201606L
|
(C++17) |
P0220R1
P0032R3 P0307R2 |
| Optionnel entièrement constexpr std::optional |
202106L
|
(C++23)
(DR20) |
P2231R1 | |
| Opérations monadiques dans std::optional |
202110L
|
(C++23) |
P0798R8
LWG3621 |
|
__cpp_lib_optional_
range_support
|
std::optional prise en charge des plages |
202406L
|
(C++26) | P3168R2 |
__cpp_lib_out_ptr
|
std::out_ptr , std::inout_ptr |
202106L
|
(C++23) | P1132R8 |
| Freestanding std::out_ptr , std::inout_ptr |
202311L
|
(C++26) | P2833R2 | |
__cpp_lib_parallel_
algorithm
|
Algorithmes parallèles |
201603L
|
(C++17) | P0024R2 |
__cpp_lib_polymorphic
|
std::polymorphic |
202502L
|
(C++26) | P3019R13 |
__cpp_lib_polymorphic_
allocator
|
std::pmr::polymorphic_allocator<> en tant que type de vocabulaire |
201902L
|
(C++20) |
P0339R6
LWG3437 |
__cpp_lib_print
|
Sortie formatée |
202207L
|
(C++23) | P2093R14 |
| Permettre une implémentation efficace de std::print |
202403L
|
(C++26)
(DR23) |
P3107R5
P3235R3 |
|
| Impression de Lignes Vides avec std::println |
202403L
|
(C++26) | P3142R0 | |
__cpp_lib_quoted_
string_io
|
std::quoted |
201304L
|
(C++14) | N3654 |
__cpp_lib_philox_
engine
|
std::philox_engine : Moteur de nombres aléatoires basé sur un compteur |
202406L
|
(C++26) | P2075R6 |
__cpp_lib_ranges
|
Bibliothèque de plages et algorithmes contraints |
201911L
|
(C++20) |
P0896R4
P1035R7 P1716R3 |
| Vues non initialisables par défaut |
202106L
|
(C++23)
(DR20) |
P2325R3 | |
| Vues avec propriété |
202110L
|
P2415R2 | ||
| std::ranges::range_adaptor_closure |
202202L
|
(C++23) | P2387R3 | |
| Assouplissement des adaptateurs de plage pour autoriser les types non copiables |
202207L
|
P2494R2 | ||
| Suppression des surcharges « poison pill » dans ranges::begin , ranges::end , ranges::rbegin , ranges::rend , et ranges::size |
202211L
|
P2602R2 | ||
| Assouplissement des plages pour autoriser certaines projections |
202302L
|
P2609R3 | ||
| Suppression de l'exigence de référence commune des concepts indirectement invocables |
202406L
|
(C++26)
(DR20) |
P2997R1 | |
__cpp_lib_ranges_
as_const
|
std::const_iterator , std::ranges::as_const_view |
202207L
|
(C++23) | P2278R4 |
| Faire en sorte que std::basic_const_iterator respecte la convertibilité de son type sous-jacent |
202311L
|
(C++26) | P2836R1 | |
__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_
find_last
|
std::ranges::find_last , std::ranges::find_last_if , et std::ranges::find_last_if_not |
202207L
|
(C++23) |
P1223R5
LWG3807 |
__cpp_lib_ranges_
fold
|
std::ranges
algorithmes de pliage
|
202207L
|
(C++23) | P2322R6 |
__cpp_lib_ranges_
generate_random
|
API vectorielle pour la génération de nombres aléatoires ( std::ranges::generate_random ) |
202403L
|
(C++26) | P1068R11 |
__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 et 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_
to_input
|
std::ranges::to_input_view |
202502L
|
(C++26) | P3137R3 |
__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
|
Ajout des nouveaux préfixes SI 2022 |
202306L
|
(C++26) | P2734R0 |
__cpp_lib_raw_memory_
algorithms
|
Extension des outils de gestion de mémoire |
201606L
|
(C++17) | P0040R3 |
| constexpr pour algorithmes de mémoire spécialisés |
202411L
|
(C++26) |
P3508R0
P3369R0 |
|
__cpp_lib_rcu
|
<rcu> : Read-Copy Update (RCU) |
202306L
|
(C++26) | P2545R4 |
__cpp_lib_reference_
from_temporary
|
std::reference_constructs_from_temporary et std::reference_converts_from_temporary |
202202L
|
(C++23) | P2255R2 |
__cpp_lib_reference_
wrapper
|
Comparaisons pour std::reference_wrapper |
202403L
|
(C++26) | P2944R3 |
__cpp_lib_remove_
cvref
|
std::remove_cvref |
201711L
|
(C++20) | P0550R2 |
__cpp_lib_result_
of_sfinae
|
std::result_of et SFINAE |
201210L
|
(C++14) | N3462 |
__cpp_lib_robust_
nonmodifying_seq_ops
|
Rendre les opérations de séquence non modifiantes plus robustes (surcharges à deux plages pour std::mismatch , std::equal et std::is_permutation ) |
201304L
|
(C++14) | N3671 |
__cpp_lib_sample
|
std::sample |
201603L
|
(C++17) | P0220R1 |
__cpp_lib_saturation_
arithmetic
|
Arithmétique de saturation |
202311L
|
(C++26) | P0543R3 |
__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 : Modèle émetteur-récepteur de contrôle d'exécution |
202406L
|
(C++26) | P2300R10 |
__cpp_lib_shared_
mutex
|
std::shared_mutex (sans temporisation) |
201505L
|
(C++17) | N4508 |
__cpp_lib_shared_
ptr_arrays
|
std::shared_ptr<T[]> |
201611L
|
(C++17) | P0497R0 |
| Prise en charge des tableaux pour 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 et std::shift_right |
201806L
|
(C++20) | P0769R2 |
| std::ranges::shift_left et std::ranges::shift_right |
202202L
|
(C++23) | P2440R1 | |
__cpp_lib_simd
|
<simd> : Types parallèles de données |
202411L
|
(C++26) |
P1928R15
P3430R3 P3441R2 P3287R3 P2933R4 |
__cpp_lib_simd_complex
|
Prise en charge des valeurs complexes entrelacées dans std::datapar::simd |
202502L
|
(C++26) | P2663R7 |
__cpp_lib_smart_
ptr_for_overwrite
|
Création de pointeurs intelligents avec initialisation par défaut ( 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
|
Permettre l'utilisation de std::weak_ptr comme clés dans les conteneurs associatifs non ordonnés |
202306L
|
(C++26) | P1901R2 |
__cpp_lib_source_
location
|
Capture d'informations du code source ( std::source_location ) |
201907L
|
(C++20) | P1208R6 |
__cpp_lib_span
|
std::span |
202002L
|
(C++20) |
P0122R7
LWG3274 P1024R3 P1976R2 |
| Rendre certaines parties de std::span autonomes |
202311L
|
(C++26) |
P2821R5
P2833R2 |
|
__cpp_lib_span_initializer_
list
|
Construction d'un std::span à partir d'une liste d'initialisation |
202311L
|
(C++26) | P2447R6 |
__cpp_lib_spanstream
|
std::spanbuf , std::spanstream |
202106L
|
(C++23) | P0448R4 |
__cpp_lib_ssize
|
std::ssize et non signé std::span::size |
201902L
|
(C++20) | P1227R2 |
__cpp_lib_sstream_
from_string_view
|
Interface entre std::stringstream et std::string_view |
202306L
|
(C++26) | P2495R3 |
__cpp_lib_stacktrace
|
Bibliothèque de trace de pile |
202011L
|
(C++23) | P0881R7 |
__cpp_lib_start_
lifetime_as
|
Gestion explicite de la durée de vie ( std::start_lifetime_as ) |
202207L
|
(C++23) | P2590R2 |
__cpp_lib_starts_
ends_with
|
Vérification de préfixe et suffixe de chaîne (
starts_with()
et
ends_with()
pour
std::string
et
std::string_view
)
|
201711L
|
(C++20) | P0457R2 |
__cpp_lib_stdatomic_
h
|
En-tête de compatibilité pour les opérations atomiques en C |
202011L
|
(C++23) | P0943R6 |
__cpp_lib_string_
contains
|
contains()
pour
std::basic_string
et
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_
udls
|
Littéraux définis par l'utilisateur pour les types chaîne |
201304L
|
(C++14) | N3642 |
__cpp_lib_string_
view
|
std::string_view |
201606L
|
(C++17) |
P0220R1
P0254R2 |
| ConstexprIterator |
201803L
|
(C++20) |
P0858R0
LWG3257 |
|
| Concaténation de std::string s et de std::string_view s |
202403L
|
(C++26) | P2591R5 | |
__cpp_lib_submdspan
|
std::submdspan |
202306L
|
(C++26) | P2630R4 |
| Dispositions de mdspan avec remplissage |
202403L
|
P2642R6 | ||
__cpp_lib_syncbuf
|
Flux de sortie synchronisé avec tampon ( std::syncbuf , std::osyncstream ) et manipulateurs |
201803L
|
(C++20) |
P0053R7
P0753R2 |
__cpp_lib_text_encoding
|
std::text_encoding |
202306L
|
(C++26) | P1885R12 |
__cpp_lib_three_
way_comparison
|
Comparaison à trois voies (support de la bibliothèque) ; ajout de la comparaison à trois voies à la bibliothèque |
201907L
|
(C++20) |
P0768R1
P1614R2 |
__cpp_lib_to_address
|
Utilitaire pour convertir un pointeur en pointeur brut ( std::to_address ) |
201711L
|
(C++20) | P0653R2 |
__cpp_lib_to_array
|
std::to_array |
201907L
|
(C++20) | P0325R4 |
__cpp_lib_to_chars
|
Conversions élémentaires de chaînes ( std::to_chars , std::from_chars ) |
201611L
|
(C++17) |
P0067R5
P0682R1 LWG3137 |
| Test de la réussite ou de l'échec des fonctions <charconv> |
202306L
|
(C++26) | P2497R0 | |
__cpp_lib_to_string
|
Redéfinition de std::to_string en termes de std::format |
202306L
|
(C++26) | P2587R3 |
__cpp_lib_to_underlying
|
std::to_underlying |
202102L
|
(C++23) | P1682R3 |
__cpp_lib_transformation_
trait_aliases
|
Modèles d'alias pour les traits de transformation |
201304L
|
(C++14) | N3655 |
__cpp_lib_transparent_
operators
|
Foncteurs d'opérateurs transparents ( std::less<> et al) |
201210L
|
(C++14) | N3421 |
| Transparent std::owner_less ( std::owner_less<void> ) |
201510L
|
(C++17) | P0074R0 | |
__cpp_lib_trivially_
relocatable
|
Traits et opérations de relocalisation triviale |
202502L
|
(C++26) | P2786R13 |
__cpp_lib_tuple_
element_t
|
std::tuple_element_t |
201402L
|
(C++14) | N3887 |
__cpp_lib_tuple_
like
|
Compatibilité entre std::tuple et les objets de type tuple ( std::pair , std::array , std::subrange ) |
202207L
|
(C++23) | P2165R4 |
| Ajouter le protocole tuple à std::complex |
202311L
|
(C++26) | P2819R2 | |
__cpp_lib_tuples_
by_type
|
Adressage des tuples par type |
201304L
|
(C++14) | N3670 |
__cpp_lib_type_identity
|
std::type_identity |
201806L
|
(C++20) | P0887R1 |
__cpp_lib_type_trait_
variable_templates
|
Modèles de variables de traits de type ( std::is_void_v , etc.) |
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 et std::unwrap_reference |
201811L
|
(C++20) |
P0318R1
LWG3348 |
__cpp_lib_variant
|
std::variant : Une union type-safe pour C++17 |
201606L
|
(C++17) |
P0088R3
P0393R3 P0032R3 |
| std::visit pour les classes dérivées de std::variant |
202102L
|
(C++23)
(DR17) |
P2162R2 | |
| Entièrement constexpr std::variant |
202106L
|
(C++23)
(DR20) |
P2231R1 | |
| Membre visit |
202306L
|
(C++26) | P2637R3 | |
__cpp_lib_void_t
|
std::void_t |
201411L
|
(C++17) | N3911 |
| Nombre total de macros : 282 | ||||
Exemple
Utilisation normale
#ifdef __has_include // Vérifier si __has_include est présent # if __has_include(<optional>) // Vérifier la présence d'une bibliothèque standard # include <optional> # elif __has_include(<experimental/optional>) // Vérifier la présence d'une version expérimentale # include <experimental/optional> # elif __has_include(<boost/optional.hpp>) // Essayer avec une bibliothèque externe # include <boost/optional.hpp> # else // Non trouvé du tout # error "Missing <optional>" # endif #endif #ifdef __has_cpp_attribute // Vérifier si __has_cpp_attribute est présent # if __has_cpp_attribute(deprecated) // Vérifier la présence d'un attribut # define DEPRECATED(msg) [[deprecated(msg)]] # endif #endif #ifndef DEPRECATED # define DEPRECATED(msg) #endif DEPRECATED("foo() has been deprecated") void foo(); #if __cpp_constexpr >= 201304 // Vérifier une version spécifique d'une fonctionnalité # define CONSTEXPR constexpr #else # define CONSTEXPR inline #endif CONSTEXPR int bar(unsigned i) { #if __cpp_binary_literals // Vérifier la présence d'une fonctionnalité 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() {}
Dump des Fonctionnalités du Compilateur
Le programme suivant (compatible C++11) liste les fonctionnalités et attributs du compilateur C++. Notez que l'utilisation de __has_cpp_attribute ( ) n'est pas conforme et dépend de l'implémentation gcc/clang.
static constexpr struct choose_what_and_how_to_print { constexpr static int longest_macro_name { 45 }; 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 = 0; } print; #if __cplusplus < 201100 # error "C++11 ou supérieur est requis" #endif #include <algorithm> #include <cstdio> #include <cstring> #include <utility> #include <vector> #ifdef __has_include # if __has_include(<version>) # include <version> # endif # if __has_include(<stdfloat>) # include <stdfloat> # endif #endif // Attendre une chaîne qui commence par 6 chiffres décimaux ou par '_' (si non supporté) #define COMPILER_VALUE_INT(n) #n [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; } }; // Macros non-FTM, incluant celles spécifiques à l'implémentation : static /*constexpr*/ std::pair<const char*, const char*> compiler[] = { COMPILER_SPECIFIC_ENTRY(__cplusplus) 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__) // Types à virgule flottante de largeur fixe <stdfloat> optionnels (C++23) COMPILER_SPECIFIC_ENTRY(__STDCPP_FLOAT16_T__) COMPILER_SPECIFIC_ENTRY(__STDCPP_FLOAT32_T__) COMPILER_SPECIFIC_ENTRY(__STDCPP_FLOAT64_T__) COMPILER_SPECIFIC_ENTRY(__STDCPP_FLOAT128_T__) COMPILER_SPECIFIC_ENTRY(__STDCPP_BFLOAT16_T__) // C23 => C++26 COMPILER_SPECIFIC_ENTRY(__STDC_ENDIAN_BIG__) COMPILER_SPECIFIC_ENTRY(__STDC_ENDIAN_LITTLE__) COMPILER_SPECIFIC_ENTRY(__STDC_ENDIAN_NATIVE__) COMPILER_SPECIFIC_ENTRY(__STDC_VERSION_STDBIT_H__) COMPILER_SPECIFIC_ENTRY(__STDC_VERSION_STDCKDINT_H__) // Ajoutez vos macros spécifiques à l'implémentation préférées... COMPILER_SPECIFIC_ENTRY(__STDCPP_DEFAULT_NEW_ALIGNMENT__) COMPILER_SPECIFIC_ENTRY(__STDCPP_THREADS__) COMPILER_SPECIFIC_ENTRY(__STDCPP_STRICT_POINTER_SAFETY__) COMPILER_SPECIFIC_ENTRY(__STDC_EMBED_NOT_FOUND__) COMPILER_SPECIFIC_ENTRY(__STDC_EMBED_FOUND__) COMPILER_SPECIFIC_ENTRY(__STDC_EMBED_EMPTY__) COMPILER_SPECIFIC_ENTRY(__STDC__) COMPILER_SPECIFIC_ENTRY(__STDC_VERSION__) COMPILER_SPECIFIC_ENTRY(__STDC_HOSTED__) COMPILER_SPECIFIC_ENTRY(__STDC_ISO_10646__) COMPILER_SPECIFIC_ENTRY(__STDC_MB_MIGHT_NEQ_WC__) COMPILER_SPECIFIC_ENTRY(__DATE__) COMPILER_SPECIFIC_ENTRY(__TIME__) }; 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[] = { //< Continuer à Remplir COMPILER_FEATURE_ENTRY(202406L, __cpp_constexpr) COMPILER_FEATURE_ENTRY(202411L, __cpp_constexpr_exceptions) COMPILER_FEATURE_ENTRY(202502L, __cpp_contracts) COMPILER_FEATURE_ENTRY(202403L, __cpp_deleted_function) COMPILER_FEATURE_ENTRY(202406L, __cpp_fold_expressions) 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(202502L, __cpp_trivial_relocatability) COMPILER_FEATURE_ENTRY(202502L, __cpp_trivial_union) COMPILER_FEATURE_ENTRY(202403L, __cpp_variadic_friend) }; static constexpr CompilerFeature cxx26_lib[] = { //< Continuer à Remplir COMPILER_FEATURE_ENTRY(202403L, __cpp_lib_algorithm_default_value_type) COMPILER_FEATURE_ENTRY(202411L, __cpp_lib_aligned_accessor) COMPILER_FEATURE_ENTRY(202311L, __cpp_lib_associative_heterogeneous_insertion) COMPILER_FEATURE_ENTRY(202403L, __cpp_lib_atomic_min_max) COMPILER_FEATURE_ENTRY(202411L, __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(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(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(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(202403L, __cpp_lib_debugging) COMPILER_FEATURE_ENTRY(202311L, __cpp_lib_format) COMPILER_FEATURE_ENTRY(202403L, __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(202311L, __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(202306L, __cpp_lib_function_ref) COMPILER_FEATURE_ENTRY(202502L, __cpp_lib_hardened_array) COMPILER_FEATURE_ENTRY(202502L, __cpp_lib_hardened_basic_string) COMPILER_FEATURE_ENTRY(202502L, __cpp_lib_hardened_basic_string_view) COMPILER_FEATURE_ENTRY(202502L, __cpp_lib_hardened_bitset) COMPILER_FEATURE_ENTRY(202502L, __cpp_lib_hardened_deque) COMPILER_FEATURE_ENTRY(202502L, __cpp_lib_hardened_expected) COMPILER_FEATURE_ENTRY(202502L, __cpp_lib_hardened_forward_list) COMPILER_FEATURE_ENTRY(202502L, __cpp_lib_hardened_inplace_vector) COMPILER_FEATURE_ENTRY(202502L, __cpp_lib_hardened_list) COMPILER_FEATURE_ENTRY(202502L, __cpp_lib_hardened_mdspan) COMPILER_FEATURE_ENTRY(202502L, __cpp_lib_hardened_optional) COMPILER_FEATURE_ENTRY(202502L, __cpp_lib_hardened_span) COMPILER_FEATURE_ENTRY(202502L, __cpp_lib_hardened_valarray) COMPILER_FEATURE_ENTRY(202502L, __cpp_lib_hardened_vector) 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(202406L, __cpp_lib_inplace_vector) COMPILER_FEATURE_ENTRY(202411L, __cpp_lib_is_sufficiently_aligned) COMPILER_FEATURE_ENTRY(202406L, __cpp_lib_is_virtual_base_of) COMPILER_FEATURE_ENTRY(202306L, __cpp_lib_is_within_lifetime) COMPILER_FEATURE_ENTRY(202311L, __cpp_lib_linalg) COMPILER_FEATURE_ENTRY(202406L, __cpp_lib_mdspan) COMPILER_FEATURE_ENTRY(202306L, __cpp_lib_not_fn) COMPILER_FEATURE_ENTRY(202406L, __cpp_lib_optional_range_support) COMPILER_FEATURE_ENTRY(202311L, __cpp_lib_out_ptr) 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(202411L, __cpp_lib_ranges_cache_latest) COMPILER_FEATURE_ENTRY(202403L, __cpp_lib_ranges_concat) COMPILER_FEATURE_ENTRY(202403L, __cpp_lib_ranges_generate_random) COMPILER_FEATURE_ENTRY(202502L, __cpp_lib_ranges_reserve_hint) COMPILER_FEATURE_ENTRY(202502L, __cpp_lib_ranges_to_input) 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(202311L, __cpp_lib_saturation_arithmetic) COMPILER_FEATURE_ENTRY(202406L, __cpp_lib_senders) COMPILER_FEATURE_ENTRY(202411L, __cpp_lib_simd) COMPILER_FEATURE_ENTRY(202502L, __cpp_lib_simd_complex) COMPILER_FEATURE_ENTRY(202306L, __cpp_lib_smart_ptr_owner_equality) COMPILER_FEATURE_ENTRY(202311L, __cpp_lib_span) COMPILER_FEATURE_ENTRY(202311L, __cpp_lib_span_initializer_list) COMPILER_FEATURE_ENTRY(202306L, __cpp_lib_sstream_from_string_view) COMPILER_FEATURE_ENTRY(202403L, __cpp_lib_string_view) COMPILER_FEATURE_ENTRY(202403L, __cpp_lib_submdspan) 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(202502L, __cpp_lib_trivially_relocatable) COMPILER_FEATURE_ENTRY(202311L, __cpp_lib_tuple_like) COMPILER_FEATURE_ENTRY(202306L, __cpp_lib_variant) }; static constexpr CompilerFeature cxx29_core[] = { //< Continuer à Remplir COMPILER_FEATURE_ENTRY(202604L, __cpp_core_TODO) }; static constexpr CompilerFeature cxx29_lib[] = { //< Continuer à Remplir COMPILER_FEATURE_ENTRY(202604L, __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("AUTRES MACROS:\n"); for (auto co : compiler) if (std::strcmp(co.premier, co.second)) std::printf("%*s %s\n", -print.longest_macro_name, co.premier, co.second); } inline void print_compiler_feature(const CompilerFeature& x) { if (not ((print.supported_features and x.peut-être()) or (print.unsupported_features and not x.peut-être()))) 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.peut-être() ? 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(""); } inline void show_latest() { auto latest_rev = []() -> int { return print.cxx29 ? 29 : print.cxx26 ? 26 : print.cxx23 ? 23 : print.cxx20 ? 20 : print.cxx17 ? 17 : print.cxx14 ? 14 : print.cxx11 ? 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(512); // macros max if (print.core_features) { // préserver l'ordre d'insertion des révisions inverses ! if (print.cxx29) std::for_each(std::begin(cxx29_core), std::end(cxx29_core), add); if (print.cxx26) std::for_each(std::begin(cxx26_core), std::end(cxx26_core), add); if (print.cxx23) std::for_each(std::begin(cxx23_core), std::end(cxx23_core), add); if (print.cxx20) std::for_each(std::begin(cxx20_core), std::end(cxx20_core), add); if (print.cxx17) std::for_each(std::begin(cxx17_core), std::end(cxx17_core), add); if (print.cxx14) std::for_each(std::begin(cxx14_core), std::end(cxx14_core), add); if (print.cxx11) std::for_each(std::begin(cxx11_core), std::end(cxx11_core), add); if (print.cxx98) std::for_each(std::begin(cxx98_core), std::end(cxx98_core), add); std::snprintf(text, sizeof text, "TOUTES LES MACROS DE BASE JUSQU'À C++%02i", latest_rev()); show(text, latest); } latest.clear(); if (print.lib_features) { // préserver l'ordre d'insertion des révisions inverses ! if (print.cxx29) std::for_each(std::begin(cxx29_lib), std::end(cxx29_lib), add); if (print.cxx26) std::for_each(std::begin(cxx26_lib), std::end(cxx26_lib), add); if (print.cxx23) std::for_each(std::begin(cxx23_lib), std::end(cxx23_lib), add); if (print.cxx20) std::for_each(std::begin(cxx20_lib), std::end(cxx20_lib), add); if (print.cxx17) std::for_each(std::begin(cxx17_lib), std::end(cxx17_lib), add); if (print.cxx14) std::for_each(std::begin(cxx14_lib), std::end(cxx14_lib), add); std::snprintf(text, sizeof text, "TOUTES LES MACROS DE BIBLIOTHÈQUE JUSQU'À C++%02i", latest_rev()); show(text, latest); } } int main() { if (print.separated_revisions) { if (print.cxx98 and print.core_features) show("C++98 CORE", cxx98_core); if (print.cxx11 and print.core_features) show("C++11 CORE", cxx11_core); if (print.cxx14 and print.core_features) show("C++14 CORE", cxx14_core); if (print.cxx14 and print.lib_features ) show("C++14 LIB" , cxx14_lib); if (print.cxx17 and print.core_features) show("C++17 CORE", cxx17_core); if (print.cxx17 and print.lib_features ) show("C++17 LIB" , cxx17_lib); if (print.cxx20 and print.core_features) show("C++20 CORE", cxx20_core); if (print.cxx20 and print.lib_features ) show("C++20 LIB" , cxx20_lib); if (print.cxx23 and print.core_features) show("C++23 CORE", cxx23_core); if (print.cxx23 and print.lib_features ) show("C++23 LIB" , cxx23_lib); if (print.cxx26 and print.core_features) show("C++26 CORE", cxx26_core); if (print.cxx26 and print.lib_features ) show("C++26 LIB" , cxx26_lib); if (print.cxx29 and print.core_features) show("C++29 CORE", cxx29_core); if (print.cxx29 and print.lib_features ) show("C++29 LIB" , cxx29_lib); } if (print.latest_revisions) show_latest(); if (print.attributes) show("ATTRIBUTS", attributes); if (print.compiler_specific) show_compiler_specific_info(); }
Sortie possible :
C++11 CŒUR (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 ... tronqué ... C++14 CŒUR (9/9) __cpp_aggregate_nsdmi 2013-04 = 2013-04 __cpp_binary_literals 2013-04 = 2013-04 __cpp_constexpr 2022-11 > 2013-04 ... tronqué ... C++14 BIBLIOTHÈQUE (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 ... tronqué ... ... tronqué ... C++23 BIBLIOTHÈQUE (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 ... tronqué ... TOUTES LES MACROS CŒUR JUSQU'À 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 ... tronqué ... TOUTES LES MACROS BIBLIOTHÈQUE JUSQU'À C++26 (158/282) __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 ... tronqué ... ATTRIBUTS (9/11) assume 2022-07 = 2022-07 carries_dependency ------- < 2008-09 deprecated 2013-09 = 2013-09 fallthrough 2016-03 = 2016-03 ... tronqué ... AUTRES MACROS : __cplusplus 202302L __GNUG__ 14 __GNUC_MINOR__ 2 __GNUC_PATCHLEVEL__ 0 __STDCPP_FLOAT16_T__ 1 __STDCPP_FLOAT32_T__ 1 ... tronqué ...
Rapports de défauts
Les rapports de défauts modifiant le comportement suivants ont été appliqués rétroactivement aux normes C++ précédemment publiées.
| DR | Applicable à | Comportement publié | Comportement corrigé |
|---|---|---|---|
| P2552R3 | C++20 |
__has_cpp_attribute
doit s'étendre à une valeur non nulle pour les attributs standard
|
peut s'étendre à 0 |
Voir aussi
| Macros de test de fonctionnalités de la bibliothèque (C++20) | définis dans l'en-tête <version> |
| Symboles de macros prédéfinis | |
| Index des symboles de macros | |
Liens externes
| 1. | Le document officiel sur les Recommandations de Test de Fonctionnalités |
| 2. | Code source pour lister les fonctionnalités du compilateur |