lucenaBAL 3.0.0
Lucena Build Abstraction Library for C++
Loading...
Searching...
No Matches
Compiler Features

Language feature availability flags to indicate whether a given C++ feature is supported by the current compiler. More...

Collaboration diagram for Compiler Features:

LBAL_CPP03

These are here only because compilers can be made to disable specific features for various reasons and we want to have a universal way of determining whether that’s happened.

#define LBAL_CPP03_EXCEPTIONS
 Language-level support for C++ Exceptions.
#define LBAL_CPP03_RTTI
 Language-level support for run-time type identification (RTTI).

LBAL_CPP11

All supported compilers support all required features of C++11. However, thread-safe static initialization can be explicitly disabled in some implementations, and garbage collection was an optional feature from C++11 until C++23, when it was removed. The rest of these are supplied to allow testing for specific features when using older language dialects, unsupported compilers, or when general language version detection is unavailable.

Remarks
This is not an exhaustive list of C++11 language features. Rather, it is currently mostly a collection of those with SD-6 macros. The feature checks themselves are not necessarily tested on the minimal-supported compiler versions, as we will often rely on external reporting or make assumptions based on what __cplusplus returns, which is not the case for more recent features.
#define LBAL_CPP11_ALIAS_TEMPLATES
 Allow type aliases to be templated.
#define LBAL_CPP11_ATTRIBUTES
 Formalize attributes as a language feature.
#define LBAL_CPP11_ATTRIBUTE_CARRIES_DEPENDENCY
 Optimization hint when compiling with certain memory models.
#define LBAL_CPP11_ATTRIBUTE_NORETURN
 Indicate that a function does not return.
#define LBAL_CPP11_CONSTEXPR
 Specify generalized constant expressions.
#define LBAL_CPP11_DECLTYPE
 Query the type of an expression.
#define LBAL_CPP11_DELEGATING_CONSTRUCTORS
 Delegating constructors.
#define LBAL_CPP11_INHERITING_CONSTRUCTORS
 Inheriting Constructors.
#define LBAL_CPP11_INITIALIZER_LISTS
 Initializer lists.
#define LBAL_CPP11_LAMBDAS
 Support for Lambda functions.
#define LBAL_CPP11_MINIMAL_GARBAGE_COLLECTION
 Support for optional C++ garbage collection.
#define LBAL_CPP11_NSDMI
 Support for non-static data member initializers.
#define LBAL_CPP11_RANGE_BASED_FOR
 Range-based for-loops.
#define LBAL_CPP11_RAW_STRINGS
 Support for raw string literals.
#define LBAL_CPP11_REF_QUALIFIERS
 Extend move semantics to *this.
#define LBAL_CPP11_RVALUE_REFERENCES
 Add rvalue references.
#define LBAL_CPP11_STATIC_ASSERT
 Add static assertions.
#define LBAL_CPP11_THREADSAFE_STATIC_INIT
 Support for thread-safe static initialization.
#define LBAL_CPP11_UNICODE_CHARACTERS
 Add char16_t and char32_t with requisite Unicode encoding.
#define LBAL_CPP11_UNICODE_LITERALS
 Support for Unicode string literals.
#define LBAL_CPP11_USER_DEFINED_LITERALS
 Support for user-defined literals.
#define LBAL_CPP11_VARIADIC_TEMPLATES
 Support for templates with variable numbers of arguments.

LBAL_CPP14

All supported compilers support all features of C++14, but some of them may require that sized deallocation be explicitly enabled.

#define LBAL_CPP14_AGGREGATE_NSDMI
 Relax the requirements on aggregates and specify aggregate member initialization.
#define LBAL_CPP14_ATTRIBUTE_DEPRECATED
 Support for marking symbols as deprecated.
#define LBAL_CPP14_BINARY_LITERALS
 Add binary literal support.
#define LBAL_CPP14_CONSTEXPR_RELAXED_CONSTRAINTS
 Relax constraints on constexpr functions, constexpr member functions and implicit const.
#define LBAL_CPP14_DECLTYPE_AUTO
 Allow deduced return types and decltype (auto).
#define LBAL_CPP14_GENERIC_LAMBDAS
 Generic (Polymorphic) Lambda Expressions.
#define LBAL_CPP14_INIT_CAPTURES
 Generalized Lambda-capture changes.
#define LBAL_CPP14_RETURN_TYPE_DEDUCTION
 Support for return type deduction for normal functions.
#define LBAL_CPP14_SIZED_DEALLOCATION
 Make available a global operator delete that takes a size argument.
#define LBAL_CPP14_VARIABLE_TEMPLATES
 Support for variable templates.

LBAL_CPP17

All supported compilers support all language features of C++17, but some of them may require that template template arguments be explicitly enabled.

#define LBAL_CPP17_AGGREGATE_BASES
 Relax the restrictions on aggregate initialization.
#define LBAL_CPP17_ALIGNED_NEW
 Specify handling of dynamic memory allocation for over-aligned data.
#define LBAL_CPP17_ATTRIBUTE_FALLTHROUGH
 Indicate that a case within a switch statements falls through.
#define LBAL_CPP17_ATTRIBUTE_MAYBE_UNUSED
 Indicate that a name or entity is possibly intentionally unused.
#define LBAL_CPP17_ATTRIBUTE_NODISCARD
 Indicate that a function return, class, or enum should not be ignored.
#define LBAL_CPP17_CAPTURE_STAR_THIS
 Allow lambda capture of *this by value as as [=,*this].
#define LBAL_CPP17_CONSTEXPR_LAMBDA
 Allow lambdas to be constexpr explicitly or implicitly.
#define LBAL_CPP17_DEDUCTION_GUIDES
 Template argument deduction for class templates.
#define LBAL_CPP17_DEDUCTION_GUIDES_DR
 Address additional class template argument deduction issues.
#define LBAL_CPP17_DEDUCTION_GUIDES_NB
 Address issues that came up during C++17 balloting regarding class template argument deduction.
#define LBAL_CPP17_ENUMERATOR_ATTRIBUTES
 Attributes for enumerators.
#define LBAL_CPP17_FOLD_EXPRESSIONS
 Allow folding a template parameter pack over a binary operator.
#define LBAL_CPP17_FOLD_EXPRESSIONS_REVISED
 Add support for unary folds and empty parameter packs to fold expressions.
#define LBAL_CPP17_GUARANTEED_COPY_ELISION
 Guarantee copy and move elision in well-defined situations.
#define LBAL_CPP17_HEX_FLOAT
 Specify Hexadecimal float literals.
#define LBAL_CPP17_IF_CONSTEXPR
 Allow constant expressions as if statements.
#define LBAL_CPP17_INHERITING_CONSTRUCTORS_REVISED
 Address core issues raised by Inheriting Constructors.
#define LBAL_CPP17_INLINE_VARIABLES
 inline variables
#define LBAL_CPP17_NAMESPACE_ATTRIBUTES
 Attributes for namespaces.
#define LBAL_CPP17_NOEXCEPT_FUNCTION_TYPE
 Make exception specifications be part of the type system.
#define LBAL_CPP17_NONTYPE_TEMPLATE_ARGS
 Allow constant evaluation for all non-type template arguments.
#define LBAL_CPP17_NONTYPE_TEMPLATE_PARAMETER_AUTO
 Allow declaring non-type template arguments with auto.
#define LBAL_CPP17_RANGE_BASED_FOR_GENERALIZED
 Generalize range-based for-loops.
#define LBAL_CPP17_STATIC_ASSERT_NO_MESSAGE
 Allow static assertions with no messages.
#define LBAL_CPP17_STRUCTURED_BINDINGS
 Add support for multiple function return values and more.
#define LBAL_CPP17_TEMPLATE_TEMPLATE_ARGS
 Resolve a defect in the matching of template arguments with template parameters.
#define LBAL_CPP17_VARIADIC_USING
 Add support for pack expansions in using-declarations.

LBAL_CPP20

Identify language features specific to the C++20 Standard

Support across compilers for C++20 features is currently inconsistent, and is one of the fundamental reasons why lucenaBAL exists. These will be updated regularly as the Standard develops.

Note that a very large number of features do not have SD-6 macros, so we often provide our own tokens. Should an official macro be created, we will synchronize with it and deprecate the proprietary one.

#define LBAL_CPP20_AGGREGATE_PAREN_INIT
 Allow aggregate initialization from parentheses as well as braces.
#define LBAL_CPP20_ALLOW_LAMBDA_CAPTURE_EQUALS_THIS
 Allow lambda capture [=, this].
#define LBAL_CPP20_ATTRIBUTES_LIKELY_AND_UNLIKELY
 Aggregate tracking the availability of likely and unlikely attributes.
#define LBAL_CPP20_ATTRIBUTE_LIKELY
 Add likely attribute for labels and statements.
#define LBAL_CPP20_ATTRIBUTE_NODISCARD_EXPANDED
 Add explanatory text to the nodiscard attribute and allow it on constructors.
#define LBAL_CPP20_ATTRIBUTE_NO_UNIQUE_ADDRESS
 Add language support for for empty objects.
#define LBAL_CPP20_ATTRIBUTE_UNLIKELY
 Add unlikely attribute for labels and statements.
#define LBAL_CPP20_CHAR8_T
 Add char8_t as a UTF-8 equivalent for char16_t and char32_t.
#define LBAL_CPP20_CONCEPTS
 Incorporate the Concepts TS into the Standard.
#define LBAL_CPP20_CONCEPTS_CONDITIONALLY_TRIVIAL_SPECIAL_MEMBER_FUNCTIONS
 Make special member functions conditionally trivial.
#define LBAL_CPP20_CONCEPTS_REFINE_RETURN_TYPE_REQUIREMENTS
 Refine definition of return-type-requirements.
#define LBAL_CPP20_CONCEPTS_RESPECIFY_RETURN_TYPE_REQUIREMENTS
 Refine definition of return-type-requirements.
#define LBAL_CPP20_CONDITIONAL_EXPLICIT
 Support explicit (bool).
#define LBAL_CPP20_CONSTEVAL
 Immediate functions.
#define LBAL_CPP20_CONSTEXPR_CHANGE_ACTIVE_UNION_MEMBER
 Allow the active member of a union inside constexpr to change.
#define LBAL_CPP20_CONSTEXPR_DYNAMIC_ALLOC
 Language support for variable-sized containers suitable for use in constexpr computations.
#define LBAL_CPP20_CONSTEXPR_DYNAMIC_POLYMORPHISM
 Allow dynamic_cast, polymorphic typeid in constexpr functions.
#define LBAL_CPP20_CONSTEXPR_INTRINSICS
 Permit unevaluated inline assembly in constexpr functions.
#define LBAL_CPP20_CONSTEXPR_IN_DECLTYPE
 Address Core Issue regarding when constexpr functions are defined.
#define LBAL_CPP20_CONSTEXPR_TRIVIAL_DEFAULT_INITIALIZATION
 Address an inconsistency in the lambda specification.
#define LBAL_CPP20_CONSTEXPR_TRY_CATCH
 Permit unevaluated inline assembly in constexpr functions.
#define LBAL_CPP20_CONSTEXPR_UNION_ALTERATION
 Allow changing the active member of a union inside constexpr.
#define LBAL_CPP20_CONSTEXPR_VIRTUAL_FUNCTION
 Allow virtual function calls in constexpr functions.
#define LBAL_CPP20_CONSTINIT
 Add the constinit keyword.
#define LBAL_CPP20_CONST_REF_QUALIFIED_POINTERS_TO_MEMBERS
 Fix const-qualified pointers to members.
#define LBAL_CPP20_DEDUCTION_GUIDES_FOR_AGGREGATES
 Class template argument deduction for aggregates.
#define LBAL_CPP20_DEFAULT_CONSTRUCTIBLE_AND_ASSIGNABLE_STATELESS_LAMBDAS
 Support default-constructible and -assignable stateless lambdas.
#define LBAL_CPP20_DEFAULT_MEMBER_INITIALIZERS_FOR_BIT_FIELDS
 Default member initializers for bit-fields.
#define LBAL_CPP20_DESIGNATED_INITIALIZERS
 Add designated initializers.
#define LBAL_CPP20_DESTROYING_DELETE
 Efficient sized delete for variable sized classes.
#define LBAL_CPP20_GENERIC_LAMBDAS_TEMPLATE_PARAMETER_LIST
 Generic (Polymorphic) Lambda Expressions.
#define LBAL_CPP20_IMPL_COROUTINE
 Add necessary language support for the <coroutine> library feature.
#define LBAL_CPP20_INIT_CAPTURES_PACK_EXPANSION
 Allow pack-expansion in lambda init-capture.
#define LBAL_CPP20_INIT_STATEMENTS_FOR_RANGE_BASED_FOR
 Add range-based for statements with initializer.
#define LBAL_CPP20_INTEGRATING_OUR_FEATURE_TEST_MACROS
 Integrate universal feature test macros into the Standard.
#define LBAL_CPP20_MODULES
 Incorporate modules.
#define LBAL_CPP20_NONTYPE_TEMPLATE_ARGS_FIXES
 Address inconsistencies in handling of non-type template arguments.
#define LBAL_CPP20_NONTYPE_TEMPLATE_PARAMETER_CLASS
 Class Types in Non-Type Template Parameters.
#define LBAL_CPP20_THREE_WAY_COMPARISON_OPERATOR
 This is the original three-way comparison operator.
#define LBAL_CPP20_THREE_WAY_COMPARISON_OPERATOR_EQUALITY_FIX
 This is the original three-way comparison operator.
#define LBAL_CPP20_THREE_WAY_COMPARISON_OPERATOR_TUNEUP
 This is the updated three-way comparison operator.
#define LBAL_CPP20_TYPENAME_OPTIONAL
 Down with typename!
#define LBAL_CPP20_USING_ENUM
 Specify using aliases for enums.
#define LBAL_CPP20_VA_OPT
 Provide a smarter predefined macro equivalent to VA__ARGS.

LBAL_CPP23

Identify language features specific to the C++23 Standard

Support across compilers for C++23 features is currently inconsistent, and is one of the fundamental reasons why lucenaBAL exists. These will be updated regularly as the Standard develops. Note that a some features do not have formal SD-6 tokens, so we often provide our own. Should an official token be created, we will synchronize with it and deprecate the proprietary one.

#define LBAL_CPP23_ATTRIBUTE_ASSUME
 Optimization hint to indicate an expression is true.
#define LBAL_CPP23_AUTO_CAST
 auto(x): decay-copy in the language
#define LBAL_CPP23_CHAR8_T_COMPATIBILITY
 char8_t Compatibility and Portability Fix
#define LBAL_CPP23_CONSTEVAL_PROPAGATE_UP
 consteval needs to propagate up
#define LBAL_CPP23_CONSTEXPR_NON_LITERAL_VARIABLES
 Allow non-literal variables, labels, and gotos in constexpr functions.
#define LBAL_CPP23_CONSTEXPR_PERMIT_STATIC_CONSTEXPR
 Permit static constexpr variables in constexpr functions.
#define LBAL_CPP23_CONSTEXPR_RELAX_RESTRICTIONS
 Relax some constexpr restrictions.
#define LBAL_CPP23_DEDUCTION_GUIDES_FROM_INHERITED_CONSTRUCTORS
 Allow class template argument deduction from inherited constructors.
#define LBAL_CPP23_EXPLICIT_THIS_PARAMETER
 Deduce this.
#define LBAL_CPP23_IF_CONSTEVAL
 if consteval
#define LBAL_CPP23_IMPLICIT_MOVE
 Simpler implicit move.
#define LBAL_CPP23_MULTIDIMENSIONAL_SUBSCRIPT
 Add a multidimensional subscript operator.
#define LBAL_CPP23_MULTIDIMENSIONAL_SUBSCRIPT_STATIC
 static operator []
#define LBAL_CPP23_NAMED_CHARACTER_ESCAPES
 Add named universal character escapes.
#define LBAL_CPP23_RANGE_BASED_FOR_TEMPORARIES
 Allow some temporaries in range-based for-loops.
#define LBAL_CPP23_SIZE_T_SUFFIX
 Add literal suffixes for (signed) size_t.
#define LBAL_CPP23_STATIC_CALL_OPERATOR
 Static operator ().

LBAL_CPP26

Identify language features specific to the C++26 Standard

Support across compilers for C++26 features is currently inconsistent, and is one of the fundamental reasons why lucenaBAL exists. These will be updated regularly as the Standard develops. Note that a some features do not have formal SD-6 tokens, so we often provide our own. Should an official token be created, we will synchronize with it and deprecate the proprietary one.

#define LBAL_CPP26_ATTRIBUTE_INDETERMINATE
 Erroneous behaviour for uninitialized reads.
#define LBAL_CPP26_CONSTEXPR_CAST_FROM_VOID_STAR
 All constexpr cast from void *.
#define LBAL_CPP26_CONSTEXPR_EXCEPTIONS
 Allow exception throwing in constant-evaluation.
#define LBAL_CPP26_CONSTEXPR_PLACEMENT_NEW
 Add constexpr placement new.
#define LBAL_CPP26_CONSTEXPR_VIRTUAL_INHERITANCE
 Allow exception throwing in constant-evaluation.
#define LBAL_CPP26_CONTRACTS
 Contracts for C++.
#define LBAL_CPP26_DELETED_FUNCTION
 = delete(\should have a reason\).
#define LBAL_CPP26_EXPANSION_STATEMENTS
 Expansion statements.
#define LBAL_CPP26_IMPL_REFLECTION
 Reflection for C++26.
#define LBAL_CPP26_IMPL_REFLECTION_CLEANUP
 Miscellaneous Reflection Cleanup.
#define LBAL_CPP26_PACK_INDEXING
 Pack Indexing.
#define LBAL_CPP26_PLACEHOLDER_VARIABLES
 Add placeholder variables (aka underscore, underbar, low line).
#define LBAL_CPP26_PP_EMBED
 #embed - a scannable, tooling-friendly binary resource inclusion mechanism
#define LBAL_CPP26_STATIC_ASSERT_USER_MESSAGE
 Allow static assertions with user-generated messages.
#define LBAL_CPP26_STRUCTURED_BINDINGS_ATTRIBUTES
 Allow attributes for Structured Bindings.
#define LBAL_CPP26_STRUCTURED_BINDINGS_PACK
 Structured Bindings can introduce a Pack.
#define LBAL_CPP26_TEMPLATE_PARAMETERS
 Allow concept and variable-template template-parameters.
#define LBAL_CPP26_TRIVIAL_UNION
 Allow trivial unions.
#define LBAL_CPP26_TRIVIAL_UNION_LIFETIME
 Adjustments to union Lifetime Rules.
#define LBAL_CPP26_VARIADIC_FRIEND
 Support variadic friends.

LBAL_CPP2D

Identify language features specific to the proposed C++29 Standard

C++29—which in draft form is referenced as C++2d—is undergoing active development. In order to allow testing, we track approved language features here. Since this is all non-final, we use LBAL_CPP2D_xxx tokens instead of LBAL_CPP29_xxx tokens; upon finalization, we’ll update the token names and deprecate the old forms. Designation of formal SD-6 tokens tends to lag approval of proposals, so we will used the proposed tokens and derive our own tokens from those; where there is not even a proposed token, we’ll make one up. Once official tokens are created, we will synchronize with them it and deprecate the speculative ones.

#define LBAL_CPP2D_CONCEPTS_CONDITIONAL_NOEXCEPT
 Conditional noexcept specifiers in compound requirements.
#define LBAL_CPP2D_CONSTEVAL_ONLY
 consteval-only Values for C++26
#define LBAL_CPP2D_CONTRACTS_VIRTUAL
 Contracts for C++: Virtual functions.
#define LBAL_CPP2D_DESIGNATED_INITIALIZERS_BASE_CLASSES
 Designated-initializers for Base Classes.
#define LBAL_CPP2D_IMPL_COROUTINE_RETURN
 return_value & return_void Are Not Mutually Exclusive
#define LBAL_CPP2D_PACK_INDEXING_TEMPLATE_NAMES
 Pack Indexing for Template Names.
#define LBAL_CPP2D_PP_EMBED_OFFSET
 #embed offset parameter

LBAL_C99

Feature availability macros to indicate whether a given C99 feature is supported by the current compiler. Each one is set to 1 if available and 0 otherwise.

#define LBAL_C99_PREPROCESSOR

Detailed Description

Language feature availability flags to indicate whether a given C++ feature is supported by the current compiler.

These are set to a non-zero value if available and 0 otherwise; every token is always set to some value. Where possible, these mimic the equivalent SD-6 macros, both in their naming and in their range of values, so a value will be:

  • 0, to indicate no availability, or
  • the SD-6 value equivalent to the available feature support, or
  • 1, if there is no equivalent SD-6 macro

Note that these tokens are neither exhaustive nor bounded:

  • Features which are available in all supported compilers are not required to have associated tokens. However, features that could conceivably be manually disabled in a given compiler—e.g., exception handling—always have tokens; whether the token is set to a non-0 value depends on the feature’s availability at build time.
  • Features we (the developers) have not had cause to use or care about are often not represented right away. Eventually, all language features accepted into the Standard from C++20 onwards will appear here.
  • Features from proposals to the Standard may have flags here; in some cases, this may occur for proposed features that have not been accepted into the Standard, e.g., as part of a Technical Specification. This typically happens with de facto standards (e.g., variants on symbol visibility handling) when it relates to language features. This sort of thing is much more common for proposed library features (e.g., likely/unlikely support was made available long before it was formally voted in).

Finally, the descriptions of the various language and library features listed here tend to be terse or oblique. This is because this documentation is not intended to be a C++ reference there are much better references out there. Rather, it is hoped that enough context is given to remind you of what a given feature does, and then any additional notes are intended only to describe gotchas and implementation oddities specific to the feature detection problem domain.

Remarks
(APIME) Some SD-6 tokens have their values bumped by newer iterations of the Document. Generally, we will issue new unique tokens here when this happens, but the values of all such tokens will reflect that of the equivalent supported SD-6 token value. For example, if SD-6 token __cpp_meow has 4 different values associated with it from 4 proposals against 4 successive Standards, we will define 4 unique tokens, one for each proposal. If the current build environment only supports the first 3 of the 4 proposals, 3 of our tokens will be set to the most recent suppoeted proposal’s value for __cpp_meow, while the 4th of our tokens, representing the most recent—and unsupported—proposal, will be set to 0.
(SEEME - bitweeder) Note that there are ambiguous cases where a feature may have been updated, e.g., as a result of a Defect Report (DR), but a new SD-6 value has not been assigned; this can be further complicated if the DR resolution is not finalized, meaning that the available feature is in an intermediate state. Currently, we have no policy for dealing with this situation, as it has not arisen yet in practice.
(APIME) Previous iterations of this header also attempted to determine whether various C99 and C11 features were available. This turned out to be impractical and a bit pointless. As a result, such features are only tracked - if they are tracked at all - in the context of their applicability to a given C++ Standard, e.g., support for the C99 preprocessor as required by C++11, and the C11 preprocessor as required by C++20.
(SEEME - bitweeder) Some implementations may choose to make a feature available to an earlier C++ release than the the first officially supported one. This can be done, for example, to make features available from a Draft Standard. Generally, we don’t second-guess the implementation if they set an SD-6 macro a particular—unless we have good reason to know it was set incorrectly. More challenging is dealing with implementations that don’t have SD-6 macros. Our approach in this case is to identify a feature as available if the implementation is known to support it and the Language version in use is greater than the last unsupported version; this latter condition catches the frequent convention of compilers identifying a future unreleased dialect as the last Standard (e.g., 201103L) plus one (e.g., 201104L), until the Standard is official and the the version changes (e.g., to 201402L).
(APIME) Features prior to the C++20 Standard are represented by tokens generally only if they have equivalent SD-6 tokens. Support can be broadened if there is demand.
The SD-6 tokens and their values referenced here are current as of the 2026-02-02 revision.

Macro Definition Documentation

◆ LBAL_C99_PREPROCESSOR

#define LBAL_C99_PREPROCESSOR
Remarks
(SEEME - bitweeder) Only older versions of MSVS are known to have problems with this, despite otherwise conforming to the C++11 Standard. Note that if support requires having a particular compiler switch set to get compatibility, this token will mirror that condition.

◆ LBAL_CPP03_EXCEPTIONS

#define LBAL_CPP03_EXCEPTIONS

Language-level support for C++ Exceptions.

This can be conditionally disabled at build-time, so we can’t rely on a language version test to detect it.

SD-6 equivalent: __cpp_exceptions >= 199711L. This token will have a value of 0 if the proposal described here is not supported.

  • 199711L N1146 C++98 Final Working Draft
Remarks
This is based on the non-existent __cpp_exceptions SD-6 token, which does not appear in any Standard document but which everyone agrees exists. Despite being a de facto language extension, it’s safe to rely on since all compilers appear to support it.

◆ LBAL_CPP03_RTTI

#define LBAL_CPP03_RTTI

Language-level support for run-time type identification (RTTI).

This can be conditionally disabled at build-time, so we can’t rely on a language version test to detect it.

SD-6 equivalent: __cpp_rtti >= 199711L. This token will have a value of 0 if the proposal described here is not supported.

  • 199711L N1146 C++98 Final Working Draft
Remarks
This is based on the non-existent __cpp_rtti SD-6 token, which does not appear in any Standard document but which everyone agrees exists. Despite being a de facto language extension, it’s safe to rely on since all compilers appear to support it.

◆ LBAL_CPP11_ALIAS_TEMPLATES

#define LBAL_CPP11_ALIAS_TEMPLATES

Allow type aliases to be templated.

SD-6 equivalent: __cpp_alias_templates >= 200704L. This token will have a value of 0 if the proposal described here is not supported.

◆ LBAL_CPP11_ATTRIBUTE_CARRIES_DEPENDENCY

#define LBAL_CPP11_ATTRIBUTE_CARRIES_DEPENDENCY

Optimization hint when compiling with certain memory models.

SD-6 equivalent: __has_cpp_attribute(carries_dependency) >= 200809L. This token will have a value of 0 if the proposal described here is not supported.

  • 200809L N2782 PDF C++ Data-Dependency Ordering: Function Annotation

◆ LBAL_CPP11_ATTRIBUTE_NORETURN

#define LBAL_CPP11_ATTRIBUTE_NORETURN

Indicate that a function does not return.

SD-6 equivalent: __has_cpp_attribute(noreturn) >= 200809L. This token will have a value of 0 if the proposal described here is not supported.

  • 200809L N2761 PDF Towards support for attributes in C++ (Revision 6)

◆ LBAL_CPP11_ATTRIBUTES

#define LBAL_CPP11_ATTRIBUTES

Formalize attributes as a language feature.

SD-6 equivalent: __cpp_attributes >= 200809L. This token will have a value of 0 if the proposal described here is not supported.

  • 200809L N2761 PDF Towards support for attributes in C++ (Revision 6)

◆ LBAL_CPP11_CONSTEXPR

#define LBAL_CPP11_CONSTEXPR

Specify generalized constant expressions.

SD-6 equivalent: __cpp_constexpr >= 200704L. Note that __cpp_constexpr has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 200704L N2235 PDF Generalized Constant Expressions—Revision 5

◆ LBAL_CPP11_DECLTYPE

#define LBAL_CPP11_DECLTYPE

Query the type of an expression.

SD-6 equivalent: __cpp_decltype >= 200707L. This token will have a value of 0 if the proposal described here is not supported.

  • 200707L N2343 PDF Decltype (revision 7): proposed wording

◆ LBAL_CPP11_DELEGATING_CONSTRUCTORS

#define LBAL_CPP11_DELEGATING_CONSTRUCTORS

Delegating constructors.

SD-6 equivalent: __cpp_delegating_constructors >= 200604L. This token will have a value of 0 if the proposal described here is not supported.

  • 200604L N1986 PDF Delegating Constructors (revision 3)

◆ LBAL_CPP11_INHERITING_CONSTRUCTORS

#define LBAL_CPP11_INHERITING_CONSTRUCTORS

Inheriting Constructors.

SD-6 equivalent: __cpp_inheriting_constructors >= 200802L. Note that __cpp_inheriting_constructors has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 200802L N2540 Inheriting Constructors (revision 5)

◆ LBAL_CPP11_INITIALIZER_LISTS

#define LBAL_CPP11_INITIALIZER_LISTS

Initializer lists.

SD-6 equivalent: __cpp_initializer_lists >= 200806L. This token will have a value of 0 if the proposal described here is not supported.

  • 200806L N2672 Initializer List proposed wording

◆ LBAL_CPP11_LAMBDAS

#define LBAL_CPP11_LAMBDAS

Support for Lambda functions.

SD-6 equivalent: __cpp_lambdas >= 200907L. This token will have a value of 0 if the proposal described here is not supported.

  • 200907L N2927 PDF New wording for C++0x Lambdas (rev. 2)

◆ LBAL_CPP11_NSDMI

#define LBAL_CPP11_NSDMI

Support for non-static data member initializers.

SD-6 equivalent: __cpp_nsdmi >= 200809L. This token will have a value of 0 if the proposal described here is not supported.

  • 200809L N2756 Non-static data member initializers

◆ LBAL_CPP11_RANGE_BASED_FOR

#define LBAL_CPP11_RANGE_BASED_FOR

Range-based for-loops.

SD-6 equivalent: __cpp_range_based_for >= 200907L. Note that __cpp_range_based_for has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 200907L N2930 Range-Based For Loop Wording (Without Concepts)

◆ LBAL_CPP11_RAW_STRINGS

#define LBAL_CPP11_RAW_STRINGS

Support for raw string literals.

SD-6 equivalent: __cpp_raw_strings >= 200710L. This token will have a value of 0 if the proposal described here is not supported.

  • 200710L N2442 Raw and Unicode String Literals; Unified Proposal (Rev. 2)

◆ LBAL_CPP11_REF_QUALIFIERS

#define LBAL_CPP11_REF_QUALIFIERS

Extend move semantics to *this.

SD-6 equivalent: __cpp_ref_qualifiers >= 200710L. This token will have a value of 0 if the proposal described here is not supported.

  • 200710L N2439 Extending move semantics to *this (revised wording)

◆ LBAL_CPP11_RVALUE_REFERENCES

#define LBAL_CPP11_RVALUE_REFERENCES

Add rvalue references.

SD-6 equivalent: __cpp_rvalue_references >= 200610L. This token will have a value of 0 if the proposal described here is not supported.

  • 200610L N2118 A Proposal to Add an Rvalue Reference to the C++ Language: Proposed Wording: Revision 3

◆ LBAL_CPP11_STATIC_ASSERT

#define LBAL_CPP11_STATIC_ASSERT

Add static assertions.

SD-6 equivalent: __cpp_static_assert >= 200410L. Note that __cpp_static_assert has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 200410L N1720 Proposal to Add Static Assertions to the Core Language (Revision 3)

◆ LBAL_CPP11_THREADSAFE_STATIC_INIT

#define LBAL_CPP11_THREADSAFE_STATIC_INIT

Support for thread-safe static initialization.

Some compilers can disable this feature if asked; the token will be set to 0 if that has happened.

SD-6 equivalent: __cpp_threadsafe_static_init >= 200806L. This token will have a value of 0 if the proposal described here is not supported.

  • 200806L N2660 Dynamic Initialization and Destruction with Concurrency

◆ LBAL_CPP11_UNICODE_CHARACTERS

#define LBAL_CPP11_UNICODE_CHARACTERS

Add char16_t and char32_t with requisite Unicode encoding.

SD-6 equivalent: __cpp_unicode_characters >= 200704L. This token will have a value of 0 if the proposal described here is not supported.

  • 200704L N2249 New Character Types in C++

◆ LBAL_CPP11_UNICODE_LITERALS

#define LBAL_CPP11_UNICODE_LITERALS

Support for Unicode string literals.

SD-6 equivalent: __cpp_unicode_literals >= 200710L. This token will have a value of 0 if the proposal described here is not supported.

  • 200710L N2442 Raw and Unicode String Literals; Unified Proposal (Rev. 2)

◆ LBAL_CPP11_USER_DEFINED_LITERALS

#define LBAL_CPP11_USER_DEFINED_LITERALS

Support for user-defined literals.

SD-6 equivalent: __cpp_user_defined_literals >= 200809L. This token will have a value of 0 if the proposal described here is not supported.

  • 200809L N2765 PDF User-defined Literals (aka. Extensible Literals (revision 5))

◆ LBAL_CPP11_VARIADIC_TEMPLATES

#define LBAL_CPP11_VARIADIC_TEMPLATES

Support for templates with variable numbers of arguments.

SD-6 equivalent: __cpp_variadic_templates >= 200704L. This token will have a value of 0 if the proposal described here is not supported.

  • 200704L N2242 PDF Proposed Wording for Variadic Templates (Revision 2)

◆ LBAL_CPP14_AGGREGATE_NSDMI

#define LBAL_CPP14_AGGREGATE_NSDMI

Relax the requirements on aggregates and specify aggregate member initialization.

SD-6 equivalent: __cpp_aggregate_nsdmi >= 201304L. This token will have a value of 0 if the proposal described here is not supported.

  • 201304L N3653 Member initializers and aggregates

◆ LBAL_CPP14_ATTRIBUTE_DEPRECATED

#define LBAL_CPP14_ATTRIBUTE_DEPRECATED

Support for marking symbols as deprecated.

SD-6 equivalent: __has_cpp_attribute(deprecated) >= 201309L. This token will have a value of 0 if the proposal described here is not supported.

  • 201309L N3760 [[deprecated]] attribute

◆ LBAL_CPP14_BINARY_LITERALS

#define LBAL_CPP14_BINARY_LITERALS

Add binary literal support.

SD-6 equivalent: __cpp_binary_literals >= 201304L. This token will have a value of 0 if the proposal described here is not supported.

  • 201304L N3472 PDF Binary Literals in the C+
  • Core Language

◆ LBAL_CPP14_CONSTEXPR_RELAXED_CONSTRAINTS

#define LBAL_CPP14_CONSTEXPR_RELAXED_CONSTRAINTS

Relax constraints on constexpr functions, constexpr member functions and implicit const.

SD-6 equivalent: __cpp_constexpr >= 201304L. Note that __cpp_constexpr has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 201304L N3652 Relaxing constraints on constexpr functions / constexpr member functions and implicit const

◆ LBAL_CPP14_DECLTYPE_AUTO

#define LBAL_CPP14_DECLTYPE_AUTO

Allow deduced return types and decltype (auto).

SD-6 equivalent: __cpp_decltype_auto >= 201304L. This token will have a value of 0 if the proposal described here is not supported.

  • 201304L N3638 Return type deduction for normal functions

◆ LBAL_CPP14_GENERIC_LAMBDAS

#define LBAL_CPP14_GENERIC_LAMBDAS

Generic (Polymorphic) Lambda Expressions.

SD-6 equivalent: __cpp_generic_lambdas >= 201304L. Note that __cpp_generic_lambdas has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 201304L N3649 Generic (Polymorphic) Lambda Expressions (Revision 3)

◆ LBAL_CPP14_INIT_CAPTURES

#define LBAL_CPP14_INIT_CAPTURES

Generalized Lambda-capture changes.

SD-6 equivalent: __cpp_init_captures >= 201304L. Note that __cpp_init_captures has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 201304L N3648 Wording Changes for Generalized Lambda-capture

◆ LBAL_CPP14_RETURN_TYPE_DEDUCTION

#define LBAL_CPP14_RETURN_TYPE_DEDUCTION

Support for return type deduction for normal functions.

SD-6 equivalent: __cpp_return_type_deduction >= 201304L. This token will have a value of 0 if the proposal described here is not supported.

  • 201304L N3638 Return type deduction for normal functions

◆ LBAL_CPP14_SIZED_DEALLOCATION

#define LBAL_CPP14_SIZED_DEALLOCATION

Make available a global operator delete that takes a size argument.

SD-6 equivalent: __cpp_sized_deallocation >= 201309L. This token will have a value of 0 if the proposal described here is not supported.

  • 201309L N3778 C++ Sized Deallocation
Remarks
Some compilers disable this by default since it’s an ABI-breaking change; clang, in particular, does this.

◆ LBAL_CPP14_VARIABLE_TEMPLATES

#define LBAL_CPP14_VARIABLE_TEMPLATES

Support for variable templates.

SD-6 equivalent: __cpp_variable_templates >= 201304L. This token will have a value of 0 if the proposal described here is not supported.

  • 201304L N3651 PDF Variable Templates (Revision 1)

◆ LBAL_CPP17_AGGREGATE_BASES

#define LBAL_CPP17_AGGREGATE_BASES

Relax the restrictions on aggregate initialization.

SD-6 equivalent: __cpp_aggregate_bases >= 201603L. This token will have a value of 0 if the proposal described here is not supported.

  • 201603L P0017R1 Extension to aggregate initialization

◆ LBAL_CPP17_ALIGNED_NEW

#define LBAL_CPP17_ALIGNED_NEW

Specify handling of dynamic memory allocation for over-aligned data.

SD-6 equivalent: __cpp_aligned_new >= 201606L. This token will have a value of 0 if the proposal described here is not supported.

  • 201606L P0035R4 Dynamic memory allocation for over-aligned data

◆ LBAL_CPP17_ATTRIBUTE_FALLTHROUGH

#define LBAL_CPP17_ATTRIBUTE_FALLTHROUGH

Indicate that a case within a switch statements falls through.

SD-6 equivalent: __has_cpp_attribute(fallthrough) >= 201603L. This token will have a value of 0 if the proposal described here is not supported.

  • 201603L P0188R1 PDF Wording for [[fallthrough]] attribute

◆ LBAL_CPP17_ATTRIBUTE_MAYBE_UNUSED

#define LBAL_CPP17_ATTRIBUTE_MAYBE_UNUSED

Indicate that a name or entity is possibly intentionally unused.

SD-6 equivalent: __has_cpp_attribute(maybe_unused) >= 201603L. This token will have a value of 0 if the proposal described here is not supported.

  • 201603L P0212R1 PDF Wording for [[maybe_unused]] attribute

◆ LBAL_CPP17_ATTRIBUTE_NODISCARD

#define LBAL_CPP17_ATTRIBUTE_NODISCARD

Indicate that a function return, class, or enum should not be ignored.

SD-6 equivalent: __has_cpp_attribute(nodiscard) >= 201603L. Note that __has_cpp_attribute(nodiscard) has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 201603L P0189R1 PDF Wording for [[nodiscard]] attribute

◆ LBAL_CPP17_CAPTURE_STAR_THIS

#define LBAL_CPP17_CAPTURE_STAR_THIS

Allow lambda capture of *this by value as as [=,*this].

SD-6 equivalent: __cpp_capture_star_this >= 201603L. This token will have a value of 0 if the proposal described here is not supported.

  • 201603L P0018R3 Lambda Capture of *this by Value as [=,*this]

◆ LBAL_CPP17_CONSTEXPR_LAMBDA

#define LBAL_CPP17_CONSTEXPR_LAMBDA

Allow lambdas to be constexpr explicitly or implicitly.

SD-6 equivalent: __cpp_constexpr >= 201603L. Note that __cpp_constexpr has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

◆ LBAL_CPP17_DEDUCTION_GUIDES

#define LBAL_CPP17_DEDUCTION_GUIDES

Template argument deduction for class templates.

SD-6 equivalent: __cpp_deduction_guides >= 201606L. Note that __cpp_deduction_guides has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 201606L P0091R3 Template argument deduction for class templates (Rev. 6)

◆ LBAL_CPP17_DEDUCTION_GUIDES_DR

#define LBAL_CPP17_DEDUCTION_GUIDES_DR

Address additional class template argument deduction issues.

SD-6 equivalent: __cpp_deduction_guides >= 201703L. Note that __cpp_deduction_guides has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 201703L P0620R0 Drafting for class template argument deduction issues

◆ LBAL_CPP17_DEDUCTION_GUIDES_NB

#define LBAL_CPP17_DEDUCTION_GUIDES_NB

Address issues that came up during C++17 balloting regarding class template argument deduction.

SD-6 equivalent: __cpp_deduction_guides >= 201611L. Note that __cpp_deduction_guides has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 201611L P0512R0 PDF Class Template Argument Deduction Assorted NB resolution and issues

◆ LBAL_CPP17_ENUMERATOR_ATTRIBUTES

#define LBAL_CPP17_ENUMERATOR_ATTRIBUTES

Attributes for enumerators.

SD-6 equivalent: __cpp_enumerator_attributes >= 201411L. This token will have a value of 0 if the proposal described here is not supported.

  • 201411L N4266 Attributes for namespaces and enumerators

◆ LBAL_CPP17_FOLD_EXPRESSIONS

#define LBAL_CPP17_FOLD_EXPRESSIONS

Allow folding a template parameter pack over a binary operator.

SD-6 equivalent: __cpp_fold_expressions >= 201411L. Note that __cpp_fold_expressions has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 201411L N4295 Folding Expressions

◆ LBAL_CPP17_FOLD_EXPRESSIONS_REVISED

#define LBAL_CPP17_FOLD_EXPRESSIONS_REVISED

Add support for unary folds and empty parameter packs to fold expressions.

SD-6 equivalent: __cpp_fold_expressions >= 201603L. Note that __cpp_fold_expressions has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 201603L P0036R0 PDF Unary Folds and Empty Parameter Packs (Revision 1)

◆ LBAL_CPP17_GUARANTEED_COPY_ELISION

#define LBAL_CPP17_GUARANTEED_COPY_ELISION

Guarantee copy and move elision in well-defined situations.

SD-6 equivalent: __cpp_guaranteed_copy_elision >= 201606L. This token will have a value of 0 if the proposal described here is not supported.

  • 201606L P0135R1 Wording for guaranteed copy elision through simplified value categories

◆ LBAL_CPP17_HEX_FLOAT

#define LBAL_CPP17_HEX_FLOAT

Specify Hexadecimal float literals.

SD-6 equivalent: __cpp_hex_float >= 201603L. This token will have a value of 0 if the proposal described here is not supported.

  • 201603L P0245R1 Hexadecimal float literals for C++

◆ LBAL_CPP17_IF_CONSTEXPR

#define LBAL_CPP17_IF_CONSTEXPR

Allow constant expressions as if statements.

SD-6 equivalent: __cpp_if_constexpr >= 201606L. This token will have a value of 0 if the proposal described here is not supported.

  • 201606L P0292R2 constexpr if: A slightly different syntax

◆ LBAL_CPP17_INHERITING_CONSTRUCTORS_REVISED

#define LBAL_CPP17_INHERITING_CONSTRUCTORS_REVISED

Address core issues raised by Inheriting Constructors.

SD-6 equivalent: __cpp_inheriting_constructors >= 201511L. Note that __cpp_inheriting_constructors has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 201511L P0136R1 Rewording inheriting constructors (core issue 1941 et al)

◆ LBAL_CPP17_INLINE_VARIABLES

#define LBAL_CPP17_INLINE_VARIABLES

inline variables

SD-6 equivalent: __cpp_inline_variables >= 201606L. This token will have a value of 0 if the proposal described here is not supported.

◆ LBAL_CPP17_NAMESPACE_ATTRIBUTES

#define LBAL_CPP17_NAMESPACE_ATTRIBUTES

Attributes for namespaces.

SD-6 equivalent: __cpp_namespace_attributes >= 201411L. This token will have a value of 0 if the proposal described here is not supported.

  • 201411L N4266 Attributes for namespaces and enumerators

◆ LBAL_CPP17_NOEXCEPT_FUNCTION_TYPE

#define LBAL_CPP17_NOEXCEPT_FUNCTION_TYPE

Make exception specifications be part of the type system.

SD-6 equivalent: __cpp_noexcept_function_type >= 201510L. This token will have a value of 0 if the proposal described here is not supported.

  • 201510L P0012R1 Make exception specifications be part of the type system, version 5

◆ LBAL_CPP17_NONTYPE_TEMPLATE_ARGS

#define LBAL_CPP17_NONTYPE_TEMPLATE_ARGS

Allow constant evaluation for all non-type template arguments.

SD-6 equivalent: __cpp_nontype_template_args >= 201411L. Note that __cpp_nontype_template_args has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 201411L N4268 Allow constant evaluation for all non-type template arguments

◆ LBAL_CPP17_NONTYPE_TEMPLATE_PARAMETER_AUTO

#define LBAL_CPP17_NONTYPE_TEMPLATE_PARAMETER_AUTO

Allow declaring non-type template arguments with auto.

SD-6 equivalent: __cpp_nontype_template_parameter_auto >= 201606L. This token will have a value of 0 if the proposal described here is not supported.

  • 201606L P0127R2 Declaring non-type template arguments with auto

◆ LBAL_CPP17_RANGE_BASED_FOR_GENERALIZED

#define LBAL_CPP17_RANGE_BASED_FOR_GENERALIZED

Generalize range-based for-loops.

SD-6 equivalent: __cpp_range_based_for >= 201603L. Note that __cpp_range_based_for has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 201603L P0184R0 Generalizing the Range-Based For Loop

◆ LBAL_CPP17_STATIC_ASSERT_NO_MESSAGE

#define LBAL_CPP17_STATIC_ASSERT_NO_MESSAGE

Allow static assertions with no messages.

SD-6 equivalent: __cpp_static_assert >= 201411L. Note that __cpp_static_assert has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 201411L N3928 Extending static_assert, v2

◆ LBAL_CPP17_STRUCTURED_BINDINGS

#define LBAL_CPP17_STRUCTURED_BINDINGS

Add support for multiple function return values and more.

SD-6 equivalent: __cpp_structured_bindings >= 201606L. Note that __cpp_structured_bindings has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 201606L P0217R3 Proposed wording for structured bindings

◆ LBAL_CPP17_TEMPLATE_TEMPLATE_ARGS

#define LBAL_CPP17_TEMPLATE_TEMPLATE_ARGS

Resolve a defect in the matching of template arguments with template parameters.

SD-6 equivalent: __cpp_template_template_args >= 201611L. This token will have a value of 0 if the proposal described here is not supported.

  • 201611L P0522R0 DR: Matching of template template-arguments excludes compatible templates
Remarks
The proposal this is from is intended to resolve a Defect Report, but unfortunately introduces a defect of its own. Some compilers are disabling this until a revised patch is in.

◆ LBAL_CPP17_VARIADIC_USING

#define LBAL_CPP17_VARIADIC_USING

Add support for pack expansions in using-declarations.

SD-6 equivalent: __cpp_variadic_using >= 201611L. This token will have a value of 0 if the proposal described here is not supported.

  • 201611L P0195R2 Pack expansions in using- declarations

◆ LBAL_CPP20_AGGREGATE_PAREN_INIT

#define LBAL_CPP20_AGGREGATE_PAREN_INIT

Allow aggregate initialization from parentheses as well as braces.

SD-6 equivalent: __cpp_aggregate_paren_init >= 201902L. This token will have a value of 0 if the proposal described here is not supported.

  • 201902L P0960R3 Allow initializing aggregates from a parenthesized list of values
Remarks
Note that paren initialization allows narrowing conversions, as usual.

◆ LBAL_CPP20_ATTRIBUTE_LIKELY

#define LBAL_CPP20_ATTRIBUTE_LIKELY

Add likely attribute for labels and statements.

SD-6 equivalent: __has_cpp_attribute(likely) >= 201803L. This token will have a value of 0 if the proposal described here is not supported.

  • 201803L P0479R5 Proposed wording for likely and unlikely attributes

◆ LBAL_CPP20_ATTRIBUTE_NO_UNIQUE_ADDRESS

#define LBAL_CPP20_ATTRIBUTE_NO_UNIQUE_ADDRESS

Add language support for for empty objects.

SD-6 equivalent: __has_cpp_attribute(no_unique_address) >= 201803L. This token will have a value of 0 if the proposal described here is not supported.

  • 201803L P0840R2 Language support for empty objects

◆ LBAL_CPP20_ATTRIBUTE_NODISCARD_EXPANDED

#define LBAL_CPP20_ATTRIBUTE_NODISCARD_EXPANDED

Add explanatory text to the nodiscard attribute and allow it on constructors.

SD-6 equivalent: __has_cpp_attribute(nodiscard) >= 201907L. Note that __has_cpp_attribute(nodiscard) has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 201907L P1301R4 [[nodiscard(should have a reason)]]
  • 201907L P1771R1 PDF [[nodiscard]] for constructors

◆ LBAL_CPP20_ATTRIBUTE_UNLIKELY

#define LBAL_CPP20_ATTRIBUTE_UNLIKELY

Add unlikely attribute for labels and statements.

SD-6 equivalent: __has_cpp_attribute(unlikely) >= 201803L. This token will have a value of 0 if the proposal described here is not supported.

  • 201803L P0479R5 Proposed wording for likely and unlikely attributes

◆ LBAL_CPP20_ATTRIBUTES_LIKELY_AND_UNLIKELY

#define LBAL_CPP20_ATTRIBUTES_LIKELY_AND_UNLIKELY

Aggregate tracking the availability of likely and unlikely attributes.

We track the availability of each attribute separately, as well as provide this aggregate to test for compliance. The aggregate’s value will be 0 if either attribute is unavailable, or 1 otherwise.

◆ LBAL_CPP20_CHAR8_T

#define LBAL_CPP20_CHAR8_T

Add char8_t as a UTF-8 equivalent for char16_t and char32_t.

SD-6 equivalent: __cpp_char8_t >= 201811L. Note that __cpp_char8_t has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 201811L P0482R6 char8_t: A type for UTF-8 characters and strings (Revision 6)

◆ LBAL_CPP20_CONCEPTS

#define LBAL_CPP20_CONCEPTS

Incorporate the Concepts TS into the Standard.

SD-6 equivalent: __cpp_concepts >= 201707L. Note that __cpp_concepts has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 201707L P0734R0 PDF Wording Paper, C++ extensions for Concepts

◆ LBAL_CPP20_CONCEPTS_CONDITIONALLY_TRIVIAL_SPECIAL_MEMBER_FUNCTIONS

#define LBAL_CPP20_CONCEPTS_CONDITIONALLY_TRIVIAL_SPECIAL_MEMBER_FUNCTIONS

Make special member functions conditionally trivial.

SD-6 equivalent: __cpp_concepts >= 202002L. Note that __cpp_concepts has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 202002L P0848R3 Conditionally Trivial Special Member Functions

◆ LBAL_CPP20_CONCEPTS_REFINE_RETURN_TYPE_REQUIREMENTS

#define LBAL_CPP20_CONCEPTS_REFINE_RETURN_TYPE_REQUIREMENTS

Refine definition of return-type-requirements.

SD-6 equivalent: __cpp_concepts >= 201907L. Note that __cpp_concepts has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 201907L P1452R2 On the non-uniform semantics of return-type-requirements

◆ LBAL_CPP20_CONCEPTS_RESPECIFY_RETURN_TYPE_REQUIREMENTS

#define LBAL_CPP20_CONCEPTS_RESPECIFY_RETURN_TYPE_REQUIREMENTS

Refine definition of return-type-requirements.

SD-6 equivalent: __cpp_concepts >= 201811L. Note that __cpp_concepts has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 201811L P1084R2 PDF Today’s return-type- requirements Are Insufficient

◆ LBAL_CPP20_CONDITIONAL_EXPLICIT

#define LBAL_CPP20_CONDITIONAL_EXPLICIT

Support explicit (bool).

Allow simplification of templated constructors that have the potential to incorrectly convert their arguments.

SD-6 equivalent: __cpp_conditional_explicit >= 201806L. This token will have a value of 0 if the proposal described here is not supported.

◆ LBAL_CPP20_CONSTEVAL

#define LBAL_CPP20_CONSTEVAL

Immediate functions.

SD-6 equivalent: __cpp_consteval >= 201811L. Note that __cpp_consteval has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 201811L P1073R3 Immediate functions

◆ LBAL_CPP20_CONSTEXPR_CHANGE_ACTIVE_UNION_MEMBER

#define LBAL_CPP20_CONSTEXPR_CHANGE_ACTIVE_UNION_MEMBER

Allow the active member of a union inside constexpr to change.

SD-6 equivalent: __cpp_constexpr >= 202002L. Note that __cpp_constexpr has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 202002L P1330R0 PDF Changing the active member of a union inside constexpr

◆ LBAL_CPP20_CONSTEXPR_DYNAMIC_ALLOC

#define LBAL_CPP20_CONSTEXPR_DYNAMIC_ALLOC

Language support for variable-sized containers suitable for use in constexpr computations.

SD-6 equivalent: __cpp_constexpr_dynamic_alloc >= 201907L. This token will have a value of 0 if the proposal described here is not supported.

  • 201907L P0784R7 More constexpr containers
Remarks
AKA, “More constexpr containers”.

◆ LBAL_CPP20_CONSTEXPR_DYNAMIC_POLYMORPHISM

#define LBAL_CPP20_CONSTEXPR_DYNAMIC_POLYMORPHISM

Allow dynamic_cast, polymorphic typeid in constexpr functions.

SD-6 equivalent: __cpp_constexpr >= 201811L. Note that __cpp_constexpr has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 201811L P1002R1 Try-catch blocks in constexpr functions
  • 201811L P1327R1 Allowing dynamic_cast, polymorphic typeid in Constant Expressions
Remarks
This and the LBAL_CPP20_CONSTEXPR_TRY_CATCH and LBAL_CPP20_CONSTEXPR_UNION_ALTERATION tokens are aliases for each other.

◆ LBAL_CPP20_CONSTEXPR_IN_DECLTYPE

#define LBAL_CPP20_CONSTEXPR_IN_DECLTYPE

Address Core Issue regarding when constexpr functions are defined.

This has the effect of allowing constant expressions in decltype declarations.

SD-6 equivalent: __cpp_constexpr_in_decltype >= 201711L. This token will have a value of 0 if the proposal described here is not supported.

  • 201711L P0859R0 Core Issue 1581: When are constexpr member functions defined?

◆ LBAL_CPP20_CONSTEXPR_INTRINSICS

#define LBAL_CPP20_CONSTEXPR_INTRINSICS

Permit unevaluated inline assembly in constexpr functions.

SD-6 equivalent: __cpp_constexpr >= 201907L. Note that __cpp_constexpr has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 201907L P1668R1 Enabling constexpr Intrinsics By Permitting Unevaluated inline-assembly in constexpr Functions
Remarks
This and the LBAL_CPP20_CONSTEXPR_TRIVIAL_DEFAULT_INITIALIZATION token are aliases for each other.

◆ LBAL_CPP20_CONSTEXPR_TRIVIAL_DEFAULT_INITIALIZATION

#define LBAL_CPP20_CONSTEXPR_TRIVIAL_DEFAULT_INITIALIZATION

Address an inconsistency in the lambda specification.

SD-6 equivalent: __cpp_constexpr >= 201907L. Note that __cpp_constexpr has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 201907L P1331R2 Permitting trivial default initialization in constexpr contexts
Remarks
This and the LBAL_CPP20_CONSTEXPR_INTRINSICS token are aliases for each other.

◆ LBAL_CPP20_CONSTEXPR_TRY_CATCH

#define LBAL_CPP20_CONSTEXPR_TRY_CATCH

Permit unevaluated inline assembly in constexpr functions.

SD-6 equivalent: __cpp_constexpr >= 201811L. Note that __cpp_constexpr has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 201811L P1002R1 Try-catch blocks in constexpr functions
Remarks
This and the LBAL_CPP20_CONSTEXPR_DYNAMIC_POLYMORPHISM and LBAL_CPP20_CONSTEXPR_UNION_ALTERATION tokens are aliases for each other.

◆ LBAL_CPP20_CONSTEXPR_UNION_ALTERATION

#define LBAL_CPP20_CONSTEXPR_UNION_ALTERATION

Allow changing the active member of a union inside constexpr.

SD-6 equivalent: __cpp_constexpr >= 201811L. Note that __cpp_constexpr has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 202002L P1330R0 PDF Changing the active member of a union inside constexpr
Remarks
This and the LBAL_CPP20_CONSTEXPR_TRY_CATCH and LBAL_CPP20_CONSTEXPR_DYNAMIC_POLYMORPHISM tokens are aliases for each other.

◆ LBAL_CPP20_CONSTEXPR_VIRTUAL_FUNCTION

#define LBAL_CPP20_CONSTEXPR_VIRTUAL_FUNCTION

Allow virtual function calls in constexpr functions.

SD-6 equivalent: __cpp_constexpr >= 201806L. Note that __cpp_constexpr has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 201806L P1064R0 Allowing Virtual Function Calls in Constant Expressions

◆ LBAL_CPP20_CONSTINIT

#define LBAL_CPP20_CONSTINIT

Add the constinit keyword.

This keyword provides a decorator that can be used to ensure that initialization of a constant is actually occuring as expected, regardless of any changing (i.e., dialect-specific) rules that might be in play.

SD-6 equivalent: __cpp_constinit >= 201907L. This token will have a value of 0 if the proposal described here is not supported.

  • 201907L P1143R2 Adding the constinit keyword
Remarks
This feature is broadly intended to be back-portable to older C+
  • dialects; in certain circumstances it’s conceivable that __cpp_constinit will be set even if the dialect is older than C++20.

◆ LBAL_CPP20_DEDUCTION_GUIDES_FOR_AGGREGATES

#define LBAL_CPP20_DEDUCTION_GUIDES_FOR_AGGREGATES

Class template argument deduction for aggregates.

SD-6 equivalent: __cpp_deduction_guides >= 201907L. Note that __cpp_deduction_guides has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 201907L P1814R0 Wording for Class Template Argument Deduction for Alias Templates
  • 201907L P1816R0 PDF Wording for class template argument deduction for aggregates

◆ LBAL_CPP20_DESIGNATED_INITIALIZERS

#define LBAL_CPP20_DESIGNATED_INITIALIZERS

Add designated initializers.

SD-6 equivalent: __cpp_designated_initializers >= 201707L. Note that __cpp_designated_initializers has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 201707L P0329R4 PDF Designated Initialization Wording

◆ LBAL_CPP20_DESTROYING_DELETE

#define LBAL_CPP20_DESTROYING_DELETE

Efficient sized delete for variable sized classes.

SD-6 equivalent: __cpp_impl_destroying_delete >= 201806L. This token will have a value of 0 if the proposal described here is not supported.

  • 201806L P0722R3 Efficient sized delete for variable sized classes

◆ LBAL_CPP20_GENERIC_LAMBDAS_TEMPLATE_PARAMETER_LIST

#define LBAL_CPP20_GENERIC_LAMBDAS_TEMPLATE_PARAMETER_LIST

Generic (Polymorphic) Lambda Expressions.

SD-6 equivalent: __cpp_generic_lambdas >= 201707L. Note that __cpp_generic_lambdas has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 201707L P0428R2 Familiar template syntax for generic lambdas

◆ LBAL_CPP20_IMPL_COROUTINE

#define LBAL_CPP20_IMPL_COROUTINE

Add necessary language support for the <coroutine> library feature.

SD-6 equivalent: __cpp_impl_coroutine >= 201902L. Note that __cpp_impl_coroutine has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 201902L LWG3393 Missing/incorrect feature test macro for coroutines
  • 201902L P0912R5 Merge Coroutines TS into C+ +20 working draft
Remarks
Technically, the proposal this is from only directs that the Coroutines TS be merged into the Standard.

◆ LBAL_CPP20_INIT_CAPTURES_PACK_EXPANSION

#define LBAL_CPP20_INIT_CAPTURES_PACK_EXPANSION

Allow pack-expansion in lambda init-capture.

SD-6 equivalent: __cpp_init_captures >= 201803L. Note that __cpp_init_captures has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 201803L P0780R2 Allow pack expansion in lambda init-capture

◆ LBAL_CPP20_INTEGRATING_OUR_FEATURE_TEST_MACROS

#define LBAL_CPP20_INTEGRATING_OUR_FEATURE_TEST_MACROS

Integrate universal feature test macros into the Standard.

Remarks
It appears this is only here to get Microsoft to support SD-6, as the other major compilers de facto meet the requirement.

◆ LBAL_CPP20_MODULES

#define LBAL_CPP20_MODULES

Incorporate modules.

SD-6 equivalent: __cpp_modules >= 201907L. This token will have a value of 0 if the proposal described here is not supported.

  • 201907L P1103R3 PDF Merging Modules
  • 201907L P1811R0 Relaxing redefinition restrictions for re-exportation robustness

◆ LBAL_CPP20_NONTYPE_TEMPLATE_ARGS_FIXES

#define LBAL_CPP20_NONTYPE_TEMPLATE_ARGS_FIXES

Address inconsistencies in handling of non-type template arguments.

SD-6 equivalent: __cpp_nontype_template_args >= 201911L. Note that __cpp_nontype_template_args has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 201911L P1907R1 Inconsistencies with non-type template parameters
Remarks
Most mainstream compilers support this, except for float-type arguments, but there is no “partial support” value to qualify this. The latest versions of some compilers even support floats “experimentally”, but have not yet updated the macro value.

◆ LBAL_CPP20_NONTYPE_TEMPLATE_PARAMETER_CLASS

#define LBAL_CPP20_NONTYPE_TEMPLATE_PARAMETER_CLASS

Class Types in Non-Type Template Parameters.

SD-6 equivalent: __cpp_nontype_template_parameter_class >= 201806L. This token will have a value of 0 if the proposal described here is not supported.

  • 201806L P0732R2 PDF Class Types in Non- Type Template Parameters

◆ LBAL_CPP20_THREE_WAY_COMPARISON_OPERATOR

#define LBAL_CPP20_THREE_WAY_COMPARISON_OPERATOR

This is the original three-way comparison operator.

SD-6 equivalent: __cpp_impl_three_way_comparison >= 201711L. Note that __cpp_impl_three_way_comparison has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 201711L P0515R3 PDF Consistent comparison
  • 201711L P0768R1 PDF Library Support for the Spaceship (Comparison) Operator

◆ LBAL_CPP20_THREE_WAY_COMPARISON_OPERATOR_EQUALITY_FIX

#define LBAL_CPP20_THREE_WAY_COMPARISON_OPERATOR_EQUALITY_FIX

This is the original three-way comparison operator.

SD-6 equivalent: __cpp_impl_three_way_comparison >= 201902L. Note that __cpp_impl_three_way_comparison has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

◆ LBAL_CPP20_THREE_WAY_COMPARISON_OPERATOR_TUNEUP

#define LBAL_CPP20_THREE_WAY_COMPARISON_OPERATOR_TUNEUP

This is the updated three-way comparison operator.

SD-6 equivalent: __cpp_impl_three_way_comparison >= 201907L. Note that __cpp_impl_three_way_comparison has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 201907L P1630R1 Spaceship needs a tune-up

◆ LBAL_CPP20_USING_ENUM

#define LBAL_CPP20_USING_ENUM

Specify using aliases for enums.

SD-6 equivalent: __cpp_using_enum >= 201907L. This token will have a value of 0 if the proposal described here is not supported.

◆ LBAL_CPP20_VA_OPT

#define LBAL_CPP20_VA_OPT

Provide a smarter predefined macro equivalent to VA__ARGS.

This behaves similarly to Microsoft’s old “broken” C preprocessor implementation in regards to variadic macro handling, in that [0..n] arguments are allowed rather than [1..n], with any extraneous comma being dropped.

Remarks
Ironically, MSVC has no implementation of this.

◆ LBAL_CPP23_ATTRIBUTE_ASSUME

#define LBAL_CPP23_ATTRIBUTE_ASSUME

Optimization hint to indicate an expression is true.

SD-6 equivalent: __has_cpp_attribute(assume) >= 202207L. This token will have a value of 0 if the proposal described here is not supported.

◆ LBAL_CPP23_AUTO_CAST

#define LBAL_CPP23_AUTO_CAST

auto(x): decay-copy in the language

SD-6 equivalent: __cpp_auto_cast >= 202110L. This token will have a value of 0 if the proposal described here is not supported.

  • 202110L P0849R8 auto(x): decay-copy in the language

◆ LBAL_CPP23_CHAR8_T_COMPATIBILITY

#define LBAL_CPP23_CHAR8_T_COMPATIBILITY

char8_t Compatibility and Portability Fix

SD-6 equivalent: __cpp_char8_t >= 202207L. Note that __cpp_char8_t has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 202207L P2513R3 char8_t Compatibility and Portability Fix

◆ LBAL_CPP23_CONSTEVAL_PROPAGATE_UP

#define LBAL_CPP23_CONSTEVAL_PROPAGATE_UP

consteval needs to propagate up

SD-6 equivalent: __cpp_consteval >= 202211L. Note that __cpp_consteval has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 202211L P2564R3 consteval needs to propagate up

◆ LBAL_CPP23_CONSTEXPR_NON_LITERAL_VARIABLES

#define LBAL_CPP23_CONSTEXPR_NON_LITERAL_VARIABLES

Allow non-literal variables, labels, and gotos in constexpr functions.

SD-6 equivalent: __cpp_constexpr >= 202110L. Note that __cpp_constexpr has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 202110L P2242R3 Non-literal variables (and labels and gotos) in constexpr functions

◆ LBAL_CPP23_CONSTEXPR_PERMIT_STATIC_CONSTEXPR

#define LBAL_CPP23_CONSTEXPR_PERMIT_STATIC_CONSTEXPR

Permit static constexpr variables in constexpr functions.

SD-6 equivalent: __cpp_constexpr >= 202211L. Note that __cpp_constexpr has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 202211L P2647R1 Permitting static constexpr variables in constexpr functions

◆ LBAL_CPP23_CONSTEXPR_RELAX_RESTRICTIONS

#define LBAL_CPP23_CONSTEXPR_RELAX_RESTRICTIONS

Relax some constexpr restrictions.

SD-6 equivalent: __cpp_constexpr >= 202207L. Note that __cpp_constexpr has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 202207L P2448R2 Relaxing some constexpr restrictions

◆ LBAL_CPP23_DEDUCTION_GUIDES_FROM_INHERITED_CONSTRUCTORS

#define LBAL_CPP23_DEDUCTION_GUIDES_FROM_INHERITED_CONSTRUCTORS

Allow class template argument deduction from inherited constructors.

SD-6 equivalent: __cpp_deduction_guides >= 202207L. Note that __cpp_deduction_guides has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 202207L P2582R1 PDF Wording for class template argument deduction from inherited constructors

◆ LBAL_CPP23_EXPLICIT_THIS_PARAMETER

#define LBAL_CPP23_EXPLICIT_THIS_PARAMETER

Deduce this.

SD-6 equivalent: __cpp_explicit_this_parameter >= 202110L. This token will have a value of 0 if the proposal described here is not supported.

◆ LBAL_CPP23_IF_CONSTEVAL

#define LBAL_CPP23_IF_CONSTEVAL

if consteval

SD-6 equivalent: __cpp_if_consteval >= 202106L. This token will have a value of 0 if the proposal described here is not supported.

◆ LBAL_CPP23_IMPLICIT_MOVE

#define LBAL_CPP23_IMPLICIT_MOVE

Simpler implicit move.

SD-6 equivalent: __cpp_implicit_move >= 202207L. This token will have a value of 0 if the proposal described here is not supported.

  • 202207L P2266R3 Simpler implicit move

◆ LBAL_CPP23_MULTIDIMENSIONAL_SUBSCRIPT

#define LBAL_CPP23_MULTIDIMENSIONAL_SUBSCRIPT

Add a multidimensional subscript operator.

SD-6 equivalent: __cpp_multidimensional_subscript >= 202110L. Note that __cpp_multidimensional_subscript has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 202110L P2128R6 PDF Multidimensional subscript operator

◆ LBAL_CPP23_MULTIDIMENSIONAL_SUBSCRIPT_STATIC

#define LBAL_CPP23_MULTIDIMENSIONAL_SUBSCRIPT_STATIC

static operator []

SD-6 equivalent: __cpp_multidimensional_subscript >= 202211L. Note that __cpp_multidimensional_subscript has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

◆ LBAL_CPP23_NAMED_CHARACTER_ESCAPES

#define LBAL_CPP23_NAMED_CHARACTER_ESCAPES

Add named universal character escapes.

SD-6 equivalent: __cpp_named_character_escapes >= 202207L. This token will have a value of 0 if the proposal described here is not supported.

  • 202207L P2071R2 Named universal character escapes

◆ LBAL_CPP23_RANGE_BASED_FOR_TEMPORARIES

#define LBAL_CPP23_RANGE_BASED_FOR_TEMPORARIES

Allow some temporaries in range-based for-loops.

SD-6 equivalent: __cpp_range_based_for >= 202211L. Note that __cpp_range_based_for has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 202211L CWG2659 Missing feature-test macro for lifetime extension in range-for loop
  • 202211L P2644R1 PDF Final Fix of Broken Range based for Loop Rev 1
  • 202211L P2718R0 PDF Wording for P2644R1 Fix for Range-based for Loop

◆ LBAL_CPP23_SIZE_T_SUFFIX

#define LBAL_CPP23_SIZE_T_SUFFIX

Add literal suffixes for (signed) size_t.

SD-6 equivalent: __cpp_size_t_suffix >= 202011L. This token will have a value of 0 if the proposal described here is not supported.

  • 202011L P0330R8 Literal Suffixes for (signed) size_t

◆ LBAL_CPP23_STATIC_CALL_OPERATOR

#define LBAL_CPP23_STATIC_CALL_OPERATOR

Static operator ().

SD-6 equivalent: __cpp_static_call_operator >= 202207L. This token will have a value of 0 if the proposal described here is not supported.

  • 202207L P1169R4 static operator()

◆ LBAL_CPP26_ATTRIBUTE_INDETERMINATE

#define LBAL_CPP26_ATTRIBUTE_INDETERMINATE

Erroneous behaviour for uninitialized reads.

SD-6 equivalent: __has_cpp_attribute(indeterminate) >= 202403L. This token will have a value of 0 if the proposal described here is not supported.

  • 202403L P2795R5 Erroneous behaviour for uninitialized reads

◆ LBAL_CPP26_CONSTEXPR_CAST_FROM_VOID_STAR

#define LBAL_CPP26_CONSTEXPR_CAST_FROM_VOID_STAR

All constexpr cast from void *.

SD-6 equivalent: __cpp_constexpr >= 202306L. Note that __cpp_constexpr has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 202306L P2738R1 PDF constexpr cast from void*: towards constexpr type-erasure

◆ LBAL_CPP26_CONSTEXPR_EXCEPTIONS

#define LBAL_CPP26_CONSTEXPR_EXCEPTIONS

Allow exception throwing in constant-evaluation.

SD-6 equivalent: __cpp_constexpr_exceptions >= 202411L. This token will have a value of 0 if the proposal described here is not supported.

  • 202411L P3068R6 Allowing exception throwing in constant-evaluation

◆ LBAL_CPP26_CONSTEXPR_PLACEMENT_NEW

#define LBAL_CPP26_CONSTEXPR_PLACEMENT_NEW

Add constexpr placement new.

SD-6 equivalent: __cpp_constexpr >= 202406L. Note that __cpp_constexpr has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 202406L P2747R2 constexpr placement new

◆ LBAL_CPP26_CONSTEXPR_VIRTUAL_INHERITANCE

#define LBAL_CPP26_CONSTEXPR_VIRTUAL_INHERITANCE

Allow exception throwing in constant-evaluation.

SD-6 equivalent: __cpp_constexpr_virtual_inheritance >= 202506L. This token will have a value of 0 if the proposal described here is not supported.

  • 202506L P3533R2 constexpr virtual inheritance

◆ LBAL_CPP26_CONTRACTS

#define LBAL_CPP26_CONTRACTS

Contracts for C++.

SD-6 equivalent: __cpp_contracts >= 202502L. Note that __cpp_contracts has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

◆ LBAL_CPP26_DELETED_FUNCTION

#define LBAL_CPP26_DELETED_FUNCTION

= delete(\should have a reason\).

SD-6 equivalent: __cpp_deleted_function >= 202403L. This token will have a value of 0 if the proposal described here is not supported.

  • 202403L P2573R2 = delete(“should have a reason”);

◆ LBAL_CPP26_EXPANSION_STATEMENTS

#define LBAL_CPP26_EXPANSION_STATEMENTS

Expansion statements.

SD-6 equivalent: __cpp_expansion_statements >= 202506L. This token will have a value of 0 if the proposal described here is not supported.

  • 202506L P1306R5 Expansion statements

◆ LBAL_CPP26_IMPL_REFLECTION

#define LBAL_CPP26_IMPL_REFLECTION

Reflection for C++26.

SD-6 equivalent: __cpp_impl_reflection >= 202506L. Note that __cpp_impl_reflection has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 202506L P2996R13 Reflection for C++26
  • 202506L P3096R12 PDF Function Parameter Reflection in Reflection for C++26
  • 202506L P3293R3 Splicing a base class subobject
  • 202506L P3394R4 Annotations for Reflection

◆ LBAL_CPP26_IMPL_REFLECTION_CLEANUP

#define LBAL_CPP26_IMPL_REFLECTION_CLEANUP

Miscellaneous Reflection Cleanup.

SD-6 equivalent: __cpp_impl_reflection >= 202603L. Note that __cpp_impl_reflection has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 202603L P3795R2 Miscellaneous Reflection Cleanup

◆ LBAL_CPP26_PACK_INDEXING

#define LBAL_CPP26_PACK_INDEXING

Pack Indexing.

SD-6 equivalent: __cpp_pack_indexing >= 202311L. Note that __cpp_pack_indexing has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

◆ LBAL_CPP26_PLACEHOLDER_VARIABLES

#define LBAL_CPP26_PLACEHOLDER_VARIABLES

Add placeholder variables (aka underscore, underbar, low line).

SD-6 equivalent: __cpp_placeholder_variables >= 202306L. This token will have a value of 0 if the proposal described here is not supported.

◆ LBAL_CPP26_PP_EMBED

#define LBAL_CPP26_PP_EMBED

#embed - a scannable, tooling-friendly binary resource inclusion mechanism

SD-6 equivalent: __cpp_pp_embed >= 202502L. Note that __cpp_pp_embed has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 202502L P1967R14 #embed - a scannable, tooling-friendly binary resource inclusion mechanism

◆ LBAL_CPP26_STATIC_ASSERT_USER_MESSAGE

#define LBAL_CPP26_STATIC_ASSERT_USER_MESSAGE

Allow static assertions with user-generated messages.

SD-6 equivalent: __cpp_static_assert >= 202306L. Note that __cpp_static_assert has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 202306L P2741R3 PDF user-generated static_assert messages

◆ LBAL_CPP26_STRUCTURED_BINDINGS_ATTRIBUTES

#define LBAL_CPP26_STRUCTURED_BINDINGS_ATTRIBUTES

Allow attributes for Structured Bindings.

SD-6 equivalent: __cpp_structured_bindings >= 202403L. Note that __cpp_structured_bindings has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 202411L P1061R10 Structured Bindings can introduce a Pack

◆ LBAL_CPP26_STRUCTURED_BINDINGS_PACK

#define LBAL_CPP26_STRUCTURED_BINDINGS_PACK

Structured Bindings can introduce a Pack.

SD-6 equivalent: __cpp_structured_bindings >= 202403L. Note that __cpp_structured_bindings has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 202403L P0609R3 PDF Attributes for Structured Bindings

◆ LBAL_CPP26_TEMPLATE_PARAMETERS

#define LBAL_CPP26_TEMPLATE_PARAMETERS

Allow concept and variable-template template-parameters.

SD-6 equivalent: __cpp_template_parameters >= 202502L. This token will have a value of 0 if the proposal described here is not supported.

  • 202502L P2841R7 PDF Concept and variable- template template-parameters

◆ LBAL_CPP26_TRIVIAL_UNION

#define LBAL_CPP26_TRIVIAL_UNION

Allow trivial unions.

SD-6 equivalent: __cpp_trivial_union >= 202502L. Note that __cpp_trivial_union has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 202502L P3074R7 trivial unions (was std::uninitialized<T>)
  • 202603L P3074R7 trivial unions (was std::uninitialized<T>)

◆ LBAL_CPP26_TRIVIAL_UNION_LIFETIME

#define LBAL_CPP26_TRIVIAL_UNION_LIFETIME

Adjustments to union Lifetime Rules.

SD-6 equivalent: __cpp_trivial_union >= 202603L. Note that __cpp_trivial_union has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 202603L P3726R2 Adjustments to union Lifetime Rules

◆ LBAL_CPP26_VARIADIC_FRIEND

#define LBAL_CPP26_VARIADIC_FRIEND

Support variadic friends.

SD-6 equivalent: __cpp_variadic_friend >= 202403L. This token will have a value of 0 if the proposal described here is not supported.

◆ LBAL_CPP2D_CONCEPTS_CONDITIONAL_NOEXCEPT

#define LBAL_CPP2D_CONCEPTS_CONDITIONAL_NOEXCEPT

Conditional noexcept specifiers in compound requirements.

SD-6 equivalent: __cpp_concepts >= 202606L. Note that __cpp_concepts has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 202606L P3822R2 Conditional noexcept specifiers in compound requirements

◆ LBAL_CPP2D_CONSTEVAL_ONLY

#define LBAL_CPP2D_CONSTEVAL_ONLY

consteval-only Values for C++26

SD-6 equivalent: __cpp_consteval >= 202606L. Note that __cpp_consteval has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 202606L P4101R1 consteval-only Values for C++26

◆ LBAL_CPP2D_CONTRACTS_VIRTUAL

#define LBAL_CPP2D_CONTRACTS_VIRTUAL

Contracts for C++: Virtual functions.

SD-6 equivalent: __cpp_contracts >= 202606L. Note that __cpp_contracts has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 202606L P3097R3 Contracts for C++: Virtual functions

◆ LBAL_CPP2D_DESIGNATED_INITIALIZERS_BASE_CLASSES

#define LBAL_CPP2D_DESIGNATED_INITIALIZERS_BASE_CLASSES

Designated-initializers for Base Classes.

SD-6 equivalent: __cpp_designated_initializers >= 202606L. Note that __cpp_designated_initializers has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 202606L P2287R6 Designated-initializers for Base Classes

◆ LBAL_CPP2D_IMPL_COROUTINE_RETURN

#define LBAL_CPP2D_IMPL_COROUTINE_RETURN

return_value & return_void Are Not Mutually Exclusive

SD-6 equivalent: __cpp_impl_coroutine >= 202606L. Note that __cpp_impl_coroutine has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 202606L P3950R1 return_value & return_void Are Not Mutually Exclusive

◆ LBAL_CPP2D_PACK_INDEXING_TEMPLATE_NAMES

#define LBAL_CPP2D_PACK_INDEXING_TEMPLATE_NAMES

Pack Indexing for Template Names.

SD-6 equivalent: __cpp_pack_indexing >= 202606L. Note that __cpp_pack_indexing has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 202606L P3670R4 Pack Indexing for Template Names

◆ LBAL_CPP2D_PP_EMBED_OFFSET

#define LBAL_CPP2D_PP_EMBED_OFFSET

#embed offset parameter

SD-6 equivalent: __cpp_pp_embed >= 202606L. Note that __cpp_pp_embed has multiple values associated with it from a number of different proposals, so this token will have the value of the latest supported proposal, or 0 if the proposal described here is not supported.

  • 202606L P3540R3 #embed offset parameter