lucenaBAL  2.0.0.20
Lucena Build Abstraction Library for C++
Compiler Features

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

LBAL_CPP98

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_CPP98_EXCEPTIONS
 Language-level support for C++ Exceptions. More...
 
#define LBAL_CPP98_RTTI
 Language-level support for run-time type identification (RTTI) More...
 

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 is an optional feature in C++. 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. More...
 
#define LBAL_CPP11_ATTRIBUTE_CARRIES_DEPENDENCY
 Optimization hint when compiling with certain memory models. More...
 
#define LBAL_CPP11_ATTRIBUTE_NORETURN
 Indicate that a function does not return. More...
 
#define LBAL_CPP11_ATTRIBUTES
 Formalize attributes as a language feature. More...
 
#define LBAL_CPP11_CONSTEXPR
 Specify generalized constant expressions. More...
 
#define LBAL_CPP11_DECLTYPE
 Query the type of an expression. More...
 
#define LBAL_CPP11_DELEGATING_CONSTRUCTORS
 Delegating constructors. More...
 
#define LBAL_CPP11_INHERITING_CONSTRUCTORS
 Inheriting Constructors. More...
 
#define LBAL_CPP11_INITIALIZER_LISTS
 Initializer lists. More...
 
#define LBAL_CPP11_LAMBDAS
 Support for Lambda functions. More...
 
#define LBAL_CPP11_MINIMAL_GARBAGE_COLLECTION
 Support for optional C++ garbage collection. More...
 
#define LBAL_CPP11_NSDMI
 Support for non-static data member initializers. More...
 
#define LBAL_CPP11_RANGE_BASED_FOR
 Range-based for-loops. More...
 
#define LBAL_CPP11_RAW_STRINGS
 Support for raw string literals. More...
 
#define LBAL_CPP11_REF_QUALIFIERS
 Extend move semantics to *this. More...
 
#define LBAL_CPP11_RVALUE_REFERENCES
 Add rvalue references. More...
 
#define LBAL_CPP11_STATIC_ASSERT
 Add static assertions. More...
 
#define LBAL_CPP11_THREADSAFE_STATIC_INIT
 Support for thread-safe static initialization. More...
 
#define LBAL_CPP11_UNICODE_CHARACTERS
 Add char16_t and char32_t with requisite Unicode encoding. More...
 
#define LBAL_CPP11_UNICODE_LITERALS
 Support for Unicode string literals. More...
 
#define LBAL_CPP11_USER_DEFINED_LITERALS
 Support for user-defined literals. More...
 
#define LBAL_CPP11_VARIADIC_TEMPLATES
 Support for templates with variable numbers of arguments. More...
 

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

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

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.

Remarks
APIME Most of these have deprecated variants that use the LBAL_CPP2A prefix, dating from the time prior to the finalization of the C++20 Standard. Prefer using the LBAL_CPP20 variants, as the deprecated versions will eventually be removed.
#define LBAL_CPP20_AGGREGATE_PAREN_INIT
 Allow aggregate initialization from parentheses as well as braces. More...
 
#define LBAL_CPP20_ALLOW_LAMBDA_CAPTURE_EQUALS_THIS
 
#define LBAL_CPP20_ATTRIBUTE_LIKELY
 
#define LBAL_CPP20_ATTRIBUTE_NODISCARD_EXPANDED
 Add explanatory text to the nodiscard attribute and allow it on constructors. More...
 
#define LBAL_CPP20_ATTRIBUTE_UNLIKELY
 
#define LBAL_CPP20_ATTRIBUTES_LIKELY_AND_UNLIKELY
 Aggregate tracking the availability of likely and unlikely attributes. More...
 
#define LBAL_CPP20_ATTRIBUTE_NO_UNIQUE_ADDRESS
 
#define LBAL_CPP20_CHAR8_T
 Add char8_t as a UTF-8 equivalent for char16_t and char32_t. More...
 
#define LBAL_CPP20_CONCEPTS
 Incorporate the Concepts TS into the Standard. More...
 
#define LBAL_CPP20_CONCEPTS_RESPECIFY_RETURN_TYPE_REQUIREMENTS
 Refine definition of return-type-requirements. More...
 
#define LBAL_CPP20_CONCEPTS_REFINE_RETURN_TYPE_REQUIREMENTS
 Refine definition of return-type-requirements. More...
 
#define LBAL_CPP20_CONDITIONAL_EXPLICIT
 
#define LBAL_CPP20_CONST_REF_QUALIFIED_POINTERS_TO_MEMBERS
 
#define LBAL_CPP20_CONSTEVAL
 Immediate functions. More...
 
#define LBAL_CPP20_CONSTEXPR_DYNAMIC_ALLOC
 Language support for variable-sized containers suitable for use in constexpr computations. More...
 
#define LBAL_CPP20_CONSTEXPR_DYNAMIC_POLYMORPHISM
 Allow dynamic_cast, polymorphic typeid in constexpr functions. More...
 
#define LBAL_CPP20_CONSTEXPR_IN_DECLTYPE
 Address Core Issue regarding when constexpr functions are defined. More...
 
#define LBAL_CPP20_CONSTEXPR_INTRINSICS
 Permit unevaluated inline assembly in constexpr functions. More...
 
#define LBAL_CPP20_CONSTEXPR_TRIVIAL_DEFAULT_INITIALIZATION
 Address an inconsistency in the lambda specification. More...
 
#define LBAL_CPP20_CONSTEXPR_TRY_CATCH
 Permit unevaluated inline assembly in constexpr functions. More...
 
#define LBAL_CPP20_CONSTEXPR_UNION_ALTERATION
 Allow changing the active member of a union in constexpr functions. More...
 
#define LBAL_CPP20_CONSTEXPR_VIRTUAL_FUNCTION
 Allow virtual function calls in constexpr functions. More...
 
#define LBAL_CPP20_CONSTINIT
 Add the constinit keyword. More...
 
#define LBAL_CPP20_IMPL_COROUTINE
 Add necessary language support for the <coroutine> library feature. More...
 
#define LBAL_CPP20_DEDUCTION_GUIDES_FOR_AGGREGATES
 Class template argument deduction for aggregates. More...
 
#define LBAL_CPP20_DEFAULT_CONSTRUCTIBLE_AND_ASSIGNABLE_STATELESS_LAMBDAS
 
#define LBAL_CPP20_DEFAULT_MEMBER_INITIALIZERS_FOR_BIT_FIELDS
 
#define LBAL_CPP20_DESIGNATED_INITIALIZERS
 
#define LBAL_CPP20_DESTROYING_DELETE
 Efficient sized delete for variable sized classes. More...
 
#define LBAL_CPP20_GENERIC_LAMBDAS_TEMPLATE_PARAMETER_LIST
 Generic (Polymorphic) Lambda Expressions. More...
 
#define LBAL_CPP20_INIT_CAPTURES_PACK_EXPANSION
 Allow pack-expansion in lambda init-capture. More...
 
#define LBAL_CPP20_INIT_STATEMENTS_FOR_RANGE_BASED_FOR
 
#define LBAL_CPP20_INITIALIZER_LIST_CONSTRUCTORS_IN_CLASS_TEMPLATE_ARGUMENT_DEDUCTION
 
#define LBAL_CPP20_INTEGRATING_OUR_FEATURE_TEST_MACROS
 Integrate universal feature test macros into the Standard. More...
 
#define LBAL_CPP20_MODULES
 Incorporate modules. More...
 
#define LBAL_CPP20_NONTYPE_TEMPLATE_ARGS_FIXES
 Address inconsistencies in handling of non-type template arguments. More...
 
#define LBAL_CPP20_NONTYPE_TEMPLATE_PARAMETER_CLASS
 Class Types in Non-Type Template Parameters. More...
 
#define LBAL_CPP20_THREE_WAY_COMPARISON_OPERATOR
 This is the original three-way comparison operator. More...
 
#define LBAL_CPP20_THREE_WAY_COMPARISON_OPERATOR_EQUALITY_FIX
 This is the original three-way comparison operator. More...
 
#define LBAL_CPP20_THREE_WAY_COMPARISON_OPERATOR_TUNEUP
 This is the updated three-way comparison operator. More...
 
#define LBAL_CPP20_TYPENAME_OPTIONAL
 
#define LBAL_CPP20_USING_ENUM
 Specify using aliases for enums. More...
 
#define LBAL_CPP20_VA_OPT
 Provide a smarter predefined macro equivalent to VA__ARGS More...
 

Technical Specifications and Proposals

Most of these will eventually migrate to one of the other sections, at which time the associated macro will be renamed (and possibly aliased).

#define LBAL_CPPTS_ATTRIBUTE_ASSERT
 Contracts: Assert Attribute. More...
 
#define LBAL_CPPTS_ATTRIBUTE_ENSURES
 Contracts: Postcondition Attribute. More...
 
#define LBAL_CPPTS_ATTRIBUTE_EXPECTS
 Contracts: Precondition Attribute. More...
 
#define LBAL_CPPTS_CONTRACTS
 Contracts. More...
 

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:

Note that these tokens are neither exhaustive nor bounded:

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 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 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 2020-05-02 revision.

Macro Definition Documentation

◆ LBAL_C99_PREPROCESSOR

#define LBAL_C99_PREPROCESSOR

SEEME 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_CPP11_ALIAS_TEMPLATES

#define LBAL_CPP11_ALIAS_TEMPLATES

Allow type aliases to be templated.

Equivalent SD-6 macro: __cpp_alias_templates

◆ LBAL_CPP11_ATTRIBUTE_CARRIES_DEPENDENCY

#define LBAL_CPP11_ATTRIBUTE_CARRIES_DEPENDENCY

Optimization hint when compiling with certain memory models.

Equivalent SD-6 test: __has_cpp_attribute(carries_dependency)

◆ LBAL_CPP11_ATTRIBUTE_NORETURN

#define LBAL_CPP11_ATTRIBUTE_NORETURN

Indicate that a function does not return.

Equivalent SD-6 test: __has_cpp_attribute(noreturn)

◆ LBAL_CPP11_ATTRIBUTES

#define LBAL_CPP11_ATTRIBUTES

Formalize attributes as a language feature.

Equivalent SD-6 macro: __cpp_attributes

◆ LBAL_CPP11_CONSTEXPR

#define LBAL_CPP11_CONSTEXPR

Specify generalized constant expressions.

Equivalent SD-6 macro: __cpp_constexpr. This token corresponds to the 200704L variant, but it will have the value of the latest supported variant, or 0 if this variant is not supported.

Remarks
__cpp_constexpr has many values associated with it, taken from a number of different proposals.

◆ LBAL_CPP11_DECLTYPE

#define LBAL_CPP11_DECLTYPE

Query the type of an expression.

Equivalent SD-6 macro: __cpp_decltype

◆ LBAL_CPP11_DELEGATING_CONSTRUCTORS

#define LBAL_CPP11_DELEGATING_CONSTRUCTORS

Delegating constructors.

Equivalent SD-6 macro: __cpp_delegating_constructors

◆ LBAL_CPP11_INHERITING_CONSTRUCTORS

#define LBAL_CPP11_INHERITING_CONSTRUCTORS

Inheriting Constructors.

Equivalent SD-6 macro: __cpp_inheriting_constructors. This token corresponds to the 200802L variant, but it will have the value of the latest supported variant, or 0 if this variant is not supported.

Remarks
__cpp_inheriting_constructors has at least 2 values associated with it, each from a different proposal.

◆ LBAL_CPP11_INITIALIZER_LISTS

#define LBAL_CPP11_INITIALIZER_LISTS

Initializer lists.

Equivalent SD-6 macro: __cpp_initializer_lists

◆ LBAL_CPP11_LAMBDAS

#define LBAL_CPP11_LAMBDAS

Support for Lambda functions.

Equivalent SD-6 macro: __cpp_lambdas

◆ LBAL_CPP11_MINIMAL_GARBAGE_COLLECTION

#define LBAL_CPP11_MINIMAL_GARBAGE_COLLECTION

Support for optional C++ garbage collection.

Equivalent SD-6 macro: none

◆ LBAL_CPP11_NSDMI

#define LBAL_CPP11_NSDMI

Support for non-static data member initializers.

Equivalent SD-6 macro: __cpp_nsdmi

◆ LBAL_CPP11_RANGE_BASED_FOR

#define LBAL_CPP11_RANGE_BASED_FOR

Range-based for-loops.

Equivalent SD-6 macro: __cpp_range_based_for. This token corresponds to the 200907L variant, but it will have the value of the latest supported variant, or 0 if this variant is not supported.

Remarks
__cpp_range_based_for has at least 2 values associated with it, each from a different proposal.

◆ LBAL_CPP11_RAW_STRINGS

#define LBAL_CPP11_RAW_STRINGS

Support for raw string literals.

Equivalent SD-6 macro: __cpp_raw_strings

◆ LBAL_CPP11_REF_QUALIFIERS

#define LBAL_CPP11_REF_QUALIFIERS

Extend move semantics to *this.

Equivalent SD-6 macro: __cpp_ref_qualifiers

◆ LBAL_CPP11_RVALUE_REFERENCES

#define LBAL_CPP11_RVALUE_REFERENCES

Add rvalue references.

Equivalent SD-6 macro: __cpp_rvalue_references

◆ LBAL_CPP11_STATIC_ASSERT

#define LBAL_CPP11_STATIC_ASSERT

Add static assertions.

Equivalent SD-6 macro: __cpp_static_assert. This token corresponds to the 200410L variant, but it will have the value of the latest supported variant, or 0 if this variant is not supported.

Remarks
__cpp_static_assert has at least 2 values associated with it, each from a different proposal.

◆ 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.

Equivalent SD-6 macro: __cpp_threadsafe_static_init

◆ LBAL_CPP11_UNICODE_CHARACTERS

#define LBAL_CPP11_UNICODE_CHARACTERS

Add char16_t and char32_t with requisite Unicode encoding.

Equivalent SD-6 macro: __cpp_unicode_characters

◆ LBAL_CPP11_UNICODE_LITERALS

#define LBAL_CPP11_UNICODE_LITERALS

Support for Unicode string literals.

Equivalent SD-6 macro: __cpp_unicode_literals

◆ LBAL_CPP11_USER_DEFINED_LITERALS

#define LBAL_CPP11_USER_DEFINED_LITERALS

Support for user-defined literals.

Equivalent SD-6 macro: __cpp_user_defined_literals

◆ LBAL_CPP11_VARIADIC_TEMPLATES

#define LBAL_CPP11_VARIADIC_TEMPLATES

Support for templates with variable numbers of arguments.

Equivalent SD-6 macro: __cpp_variadic_templates

◆ LBAL_CPP14_AGGREGATE_NSDMI

#define LBAL_CPP14_AGGREGATE_NSDMI

Relax the requirements on aggregates and specify aggregate member initialization.

Equivalent SD-6 macro: __cpp_aggregate_nsdmi

◆ LBAL_CPP14_ATTRIBUTE_DEPRECATED

#define LBAL_CPP14_ATTRIBUTE_DEPRECATED

Support for marking symbols as deprecated.

Equivalent SD-6 test: __has_cpp_attribute(deprecated)

◆ LBAL_CPP14_BINARY_LITERALS

#define LBAL_CPP14_BINARY_LITERALS

Add binary literal support.

Equivalent SD-6 macro: __cpp_binary_literals

◆ LBAL_CPP14_CONSTEXPR_RELAXED_CONSTRAINTS

#define LBAL_CPP14_CONSTEXPR_RELAXED_CONSTRAINTS

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

Equivalent SD-6 macro: __cpp_constexpr. This token corresponds to the 201304L variant, but it will have the value of the latest supported variant, or 0 if this variant is not supported.

Remarks
__cpp_constexpr has many values associated with it, taken from a number of different proposals.

◆ LBAL_CPP14_DECLTYPE_AUTO

#define LBAL_CPP14_DECLTYPE_AUTO

Allow deduced return types and decltype (auto)

Equivalent SD-6 macro: __cpp_decltype_auto

◆ LBAL_CPP14_GENERIC_LAMBDAS

#define LBAL_CPP14_GENERIC_LAMBDAS

Generic (Polymorphic) Lambda Expressions.

Equivalent SD-6 macro: __cpp_generic_lambdas. This token corresponds to the 201304L variant, but it will have the value of the latest supported variant, or 0 if this variant is not supported.

◆ LBAL_CPP14_INIT_CAPTURES

#define LBAL_CPP14_INIT_CAPTURES

Generalized Lambda-capture changes.

Equivalent SD-6 macro: __cpp_init_captures. This token corresponds to the 201304L variant, but it will have the value of the latest supported variant, or 0 if this variant is not supported.

◆ LBAL_CPP14_RETURN_TYPE_DEDUCTION

#define LBAL_CPP14_RETURN_TYPE_DEDUCTION

Support for return type deduction for normal functions.

Equivalent SD-6 macro: __cpp_return_type_deduction

◆ LBAL_CPP14_SIZED_DEALLOCATION

#define LBAL_CPP14_SIZED_DEALLOCATION

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

Equivalent SD-6 macro: __cpp_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.

Equivalent SD-6 macro: __cpp_variable_templates

◆ LBAL_CPP17_AGGREGATE_BASES

#define LBAL_CPP17_AGGREGATE_BASES

Relax the restrictions on aggregate initialization.

Equivalent SD-6 macro: __cpp_aggregate_bases

◆ LBAL_CPP17_ALIGNED_NEW

#define LBAL_CPP17_ALIGNED_NEW

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

Equivalent SD-6 macro: __cpp_aligned_new

◆ LBAL_CPP17_ATTRIBUTE_FALLTHROUGH

#define LBAL_CPP17_ATTRIBUTE_FALLTHROUGH

Indicate that a case within a switch statements falls through.

Equivalent SD-6 test: __has_cpp_attribute(fallthrough)

◆ LBAL_CPP17_ATTRIBUTE_MAYBE_UNUSED

#define LBAL_CPP17_ATTRIBUTE_MAYBE_UNUSED

Indicate that a name or entity is possibly intentionally unused.

Equivalent SD-6 test: __has_cpp_attribute(maybe_unused)

◆ LBAL_CPP17_ATTRIBUTE_NODISCARD

#define LBAL_CPP17_ATTRIBUTE_NODISCARD

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

Equivalent SD-6 test: __has_cpp_attribute(nodiscard). This token corresponds to the 201603L variant, but it will have the value of the latest supported variant, or 0 if this variant is not supported.

Remarks
The nodiscard attribute has at least 2 values associated with it, from a number of different proposals.

◆ LBAL_CPP17_CAPTURE_STAR_THIS

#define LBAL_CPP17_CAPTURE_STAR_THIS

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

Equivalent SD-6 macro: __cpp_capture_star_this

◆ LBAL_CPP17_CONSTEXPR_LAMBDA

#define LBAL_CPP17_CONSTEXPR_LAMBDA

Allow lambdas to be constexpr explicitly or implicitly.

Equivalent SD-6 macro: __cpp_constexpr. This token corresponds to the 201603L variant, but it will have the value of the latest supported variant, or 0 if this variant is not supported.

Remarks
__cpp_constexpr has many values associated with it, taken from a number of different proposals.

◆ LBAL_CPP17_DEDUCTION_GUIDES

#define LBAL_CPP17_DEDUCTION_GUIDES

Template argument deduction for class templates.

Equivalent SD-6 macro: __cpp_deduction_guides. This token corresponds to the 201606L variant, but it will have the value of the latest supported variant, or 0 if this variant is not supported.

Remarks
__cpp_deduction_guides has at least 4 values associated with it, across at least 5 proposals.

◆ LBAL_CPP17_DEDUCTION_GUIDES_DR

#define LBAL_CPP17_DEDUCTION_GUIDES_DR

Address additional class template argument deduction issues.

Equivalent SD-6 macro: __cpp_deduction_guides. This token corresponds to the 201703L variant, but it will have the value of the latest supported variant, or 0 if this variant is not supported.

Remarks
__cpp_deduction_guides has at least 4 values associated with it, across at least 5 proposals.

◆ 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.

Equivalent SD-6 macro: __cpp_deduction_guides. This token corresponds to the 201611L variant, but it will have the value of the latest supported variant, or 0 if this variant is not supported.

Remarks
__cpp_deduction_guides has at least 4 values associated with it, across at least 5 proposals.

◆ LBAL_CPP17_ENUMERATOR_ATTRIBUTES

#define LBAL_CPP17_ENUMERATOR_ATTRIBUTES

Attributes for enumerators.

Equivalent SD-6 macro: __cpp_enumerator_attributes

◆ LBAL_CPP17_FOLD_EXPRESSIONS

#define LBAL_CPP17_FOLD_EXPRESSIONS

Allow folding a template parameter pack over a binary operator.

Equivalent SD-6 macro: __cpp_fold_expressions. This token corresponds to the 201411L variant, but it will have the value of the latest supported variant, or 0 if this variant is not supported.

Remarks
__cpp_fold_expressions has at least 2 values associated with it, across at least 2 proposals.

◆ LBAL_CPP17_FOLD_EXPRESSIONS_REVISED

#define LBAL_CPP17_FOLD_EXPRESSIONS_REVISED

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

Equivalent SD-6 macro: __cpp_fold_expressions. This token corresponds to the 201603L variant, but it will have the value of the latest supported variant, or 0 if this variant is not supported.

Remarks
__cpp_fold_expressions has at least 2 values associated with it, across at least 2 proposals.

◆ LBAL_CPP17_GUARANTEED_COPY_ELISION

#define LBAL_CPP17_GUARANTEED_COPY_ELISION

Guarantee copy and move elision in well-defined situations.

Equivalent SD-6 macro: __cpp_guaranteed_copy_elision

◆ LBAL_CPP17_HEX_FLOAT

#define LBAL_CPP17_HEX_FLOAT

Specify Hexadecimal float literals.

Equivalent SD-6 macro: __cpp_hex_float

◆ LBAL_CPP17_IF_CONSTEXPR

#define LBAL_CPP17_IF_CONSTEXPR

Allow constant expressions as if statements.

Equivalent SD-6 macro: __cpp_if_constexpr

◆ LBAL_CPP17_INHERITING_CONSTRUCTORS_REVISED

#define LBAL_CPP17_INHERITING_CONSTRUCTORS_REVISED

Address core issues raised by Inheriting Constructors.

Equivalent SD-6 macro: __cpp_inheriting_constructors. This token corresponds to the 201511L variant, but it will have the value of the latest supported variant, or 0 if this variant is not supported.

Remarks
__cpp_inheriting_constructors has at least 2 values associated with it, each from a different proposal.

◆ LBAL_CPP17_INLINE_VARIABLES

#define LBAL_CPP17_INLINE_VARIABLES

inline variables

Equivalent SD-6 macro: __cpp_inline_variables

◆ LBAL_CPP17_NAMESPACE_ATTRIBUTES

#define LBAL_CPP17_NAMESPACE_ATTRIBUTES

Attributes for namespaces.

Equivalent SD-6 macro: __cpp_namespace_attributes

◆ LBAL_CPP17_NOEXCEPT_FUNCTION_TYPE

#define LBAL_CPP17_NOEXCEPT_FUNCTION_TYPE

Make exception specifications be part of the type system.

Equivalent SD-6 macro: __cpp_noexcept_function_type

◆ LBAL_CPP17_NONTYPE_TEMPLATE_ARGS

#define LBAL_CPP17_NONTYPE_TEMPLATE_ARGS

Allow constant evaluation for all non-type template arguments.

Equivalent SD-6 macro: __cpp_nontype_template_args. This token corresponds to the 201411L variant, but it will have the value of the latest supported variant, or 0 if this variant is not supported.

◆ LBAL_CPP17_NONTYPE_TEMPLATE_PARAMETER_AUTO

#define LBAL_CPP17_NONTYPE_TEMPLATE_PARAMETER_AUTO

Allow declaring non-type template arguments with auto.

Equivalent SD-6 macro: __cpp_nontype_template_parameter_auto

◆ LBAL_CPP17_RANGE_BASED_FOR_GENERALIZED

#define LBAL_CPP17_RANGE_BASED_FOR_GENERALIZED

Generalize range-based for-loops.

Equivalent SD-6 macro: __cpp_range_based_for. This token corresponds to the 201603L variant, but it will have the value of the latest supported variant, or 0 if this variant is not supported.

Remarks
__cpp_range_based_for has at least 2 values associated with it, each from a different proposal.

◆ LBAL_CPP17_STATIC_ASSERT_NO_MESSAGE

#define LBAL_CPP17_STATIC_ASSERT_NO_MESSAGE

Allow static assertions with no messages.

Equivalent SD-6 macro: __cpp_static_assert. This token corresponds to the 201411L variant, but it will have the value of the latest supported variant, or 0 if this variant is not supported.

Remarks
__cpp_static_assert has at least 2 values associated with it, each from a different proposal.

◆ LBAL_CPP17_STRUCTURED_BINDINGS

#define LBAL_CPP17_STRUCTURED_BINDINGS

Add support for multiple function return values and more.

Equivalent SD-6 macro: __cpp_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.

Equivalent SD-6 macro: __cpp_template_template_args

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.

Equivalent SD-6 macro: __cpp_variadic_using

◆ LBAL_CPP20_AGGREGATE_PAREN_INIT

#define LBAL_CPP20_AGGREGATE_PAREN_INIT

Allow aggregate initialization from parentheses as well as braces.

Equivalent SD-6 macro: __cpp_aggregate_paren_init

Remarks
Note that paren initialization allows narrowing conversions, as usual.

◆ LBAL_CPP20_ALLOW_LAMBDA_CAPTURE_EQUALS_THIS

#define LBAL_CPP20_ALLOW_LAMBDA_CAPTURE_EQUALS_THIS

Equivalent SD-6 macro: none

◆ LBAL_CPP20_ATTRIBUTE_LIKELY

#define LBAL_CPP20_ATTRIBUTE_LIKELY

Equivalent SD-6 test: __has_cpp_attribute(likely)

◆ LBAL_CPP20_ATTRIBUTE_NO_UNIQUE_ADDRESS

#define LBAL_CPP20_ATTRIBUTE_NO_UNIQUE_ADDRESS

Equivalent SD-6 macro: __has_cpp_attribute(no_unique_address)

◆ LBAL_CPP20_ATTRIBUTE_NODISCARD_EXPANDED

#define LBAL_CPP20_ATTRIBUTE_NODISCARD_EXPANDED

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

Equivalent SD-6 test: __has_cpp_attribute(nodiscard). This token corresponds to the 201907L variant, but it will have the value of the latest supported variant, or 0 if this variant is not supported.

Remarks
The nodiscard attribute has at least 2 values associated with it, from a number of different proposals.

◆ LBAL_CPP20_ATTRIBUTE_UNLIKELY

#define LBAL_CPP20_ATTRIBUTE_UNLIKELY

Equivalent SD-6 test: __has_cpp_attribute(unlikely)

◆ 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.

Equivalent SD-6 macro: none

◆ LBAL_CPP20_CHAR8_T

#define LBAL_CPP20_CHAR8_T

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

Equivalent SD-6 macro: __cpp_char8_t

◆ LBAL_CPP20_CONCEPTS

#define LBAL_CPP20_CONCEPTS

Incorporate the Concepts TS into the Standard.

Equivalent (SD-6) macro: __cpp_concepts. This token corresponds to the 201707L variant, but it will have the value of the latest supported variant, or 0 if this variant is not supported.

Remarks
__cpp_concepts has at least 3 values associated with it, each from a different proposal.
SEEME Earlier versions of lucenaBAL used a placeholder value for this token. We’ve since updated to the official values from SD-6. No migration mechanism is in place since no impacted implementations were in the wild at the time.

◆ LBAL_CPP20_CONCEPTS_REFINE_RETURN_TYPE_REQUIREMENTS

#define LBAL_CPP20_CONCEPTS_REFINE_RETURN_TYPE_REQUIREMENTS

Refine definition of return-type-requirements.

Equivalent (SD-6) macro: __cpp_concepts. This token corresponds to the 201907L variant, but it will have the value of the latest supported variant, or 0 if this variant is not supported.

Remarks
__cpp_concepts has at least 3 values associated with it, each from a different proposal.
SEEME Earlier versions of lucenaBAL used a placeholder value for this token. We’ve since updated to the official values from SD-6. No migration mechanism is in place since no impacted implementations were in the wild at the time.

◆ LBAL_CPP20_CONCEPTS_RESPECIFY_RETURN_TYPE_REQUIREMENTS

#define LBAL_CPP20_CONCEPTS_RESPECIFY_RETURN_TYPE_REQUIREMENTS

Refine definition of return-type-requirements.

Equivalent (SD-6) macro: __cpp_concepts. This token corresponds to the 201811L variant, but it will have the value of the latest supported variant, or 0 if this variant is not supported.

Remarks
__cpp_concepts has at least 3 values associated with it, each from a different proposal.
SEEME Earlier versions of lucenaBAL used a placeholder value for this token. We’ve since updated to the official values from SD-6. No migration mechanism is in place since no impacted implementations were in the wild at the time.

◆ LBAL_CPP20_CONDITIONAL_EXPLICIT

#define LBAL_CPP20_CONDITIONAL_EXPLICIT

Aka, explicit (bool); allows simplification of templated constructors that have the potential to incorrectly convert their arguments.

Equivalent SD-6 macro: __cpp_conditional_explicit

◆ LBAL_CPP20_CONST_REF_QUALIFIED_POINTERS_TO_MEMBERS

#define LBAL_CPP20_CONST_REF_QUALIFIED_POINTERS_TO_MEMBERS

Equivalent SD-6 macro: none

◆ LBAL_CPP20_CONSTEVAL

#define LBAL_CPP20_CONSTEVAL

Immediate functions.

Equivalent SD-6 macro: __cpp_consteval

◆ LBAL_CPP20_CONSTEXPR_DYNAMIC_ALLOC

#define LBAL_CPP20_CONSTEXPR_DYNAMIC_ALLOC

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

Equivalent SD-6 macro: __cpp_constexpr_dynamic_alloc

Remarks
AKA, “More constexpr containers”.

◆ LBAL_CPP20_CONSTEXPR_DYNAMIC_POLYMORPHISM

#define LBAL_CPP20_CONSTEXPR_DYNAMIC_POLYMORPHISM

Allow dynamic_cast, polymorphic typeid in constexpr functions.

Equivalent SD-6 macro: __cpp_constexpr. This token corresponds to the 201811L variant, but it will have the value of the latest supported variant, or 0 if this variant is not supported.

Remarks
__cpp_constexpr has many values associated with it, taken from a number of different proposals.
This and the LBAL_CPP20_CONSTEXPR_DYNAMIC_POLYMORPHISM and LBAL_CPP20_CONSTEXPR_UNION_ALTERATION variants 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.

Equivalent SD-6 macro: __cpp_constexpr_in_decltype. This has the effect of allowing constant expressions in decltype declarations.

◆ LBAL_CPP20_CONSTEXPR_INTRINSICS

#define LBAL_CPP20_CONSTEXPR_INTRINSICS

Permit unevaluated inline assembly in constexpr functions.

Equivalent SD-6 macro: __cpp_constexpr. This token corresponds to the 201907L variant, but it will have the value of the latest supported variant, or 0 if this variant is not supported.

Remarks
__cpp_constexpr has many values associated with it, taken from a number of different proposals.
This and the LBAL_CPP20_CONSTEXPR_TRIVIAL_DEFAULT_INITIALIZATION variant 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.

Equivalent SD-6 macro: __cpp_constexpr. This token corresponds to the 201907L variant, but it will have the value of the latest supported variant, or 0 if this variant is not supported.

Remarks
__cpp_constexpr has many values associated with it, taken from a number of different proposals.
This and the LBAL_CPP20_CONSTEXPR_INTRINSICS variant are aliases for each other.

◆ LBAL_CPP20_CONSTEXPR_TRY_CATCH

#define LBAL_CPP20_CONSTEXPR_TRY_CATCH

Permit unevaluated inline assembly in constexpr functions.

Equivalent SD-6 macro: __cpp_constexpr. This token corresponds to the 201811L variant, but it will have the value of the latest supported variant, or 0 if this variant is not supported.

Remarks
__cpp_constexpr has many values associated with it, taken from a number of different proposals.
This and the LBAL_CPP20_CONSTEXPR_DYNAMIC_POLYMORPHISM and LBAL_CPP20_CONSTEXPR_UNION_ALTERATION variants are aliases for each other.

◆ LBAL_CPP20_CONSTEXPR_UNION_ALTERATION

#define LBAL_CPP20_CONSTEXPR_UNION_ALTERATION

Allow changing the active member of a union in constexpr functions.

Equivalent SD-6 macro: __cpp_constexpr. This token corresponds to the 201811L variant, but it will have the value of the latest supported variant, or 0 if this variant is not supported.

Remarks
__cpp_constexpr has many values associated with it, taken from a number of different proposals.
This and the LBAL_CPP20_CONSTEXPR_DYNAMIC_POLYMORPHISM and LBAL_CPP20_CONSTEXPR_TRY_CATCH variants are aliases for each other.

◆ LBAL_CPP20_CONSTEXPR_VIRTUAL_FUNCTION

#define LBAL_CPP20_CONSTEXPR_VIRTUAL_FUNCTION

Allow virtual function calls in constexpr functions.

Equivalent SD-6 macro: __cpp_constexpr. This token corresponds to the 201806L variant, but it will have the value of the latest supported variant, or 0 if this variant is not supported.

Remarks
__cpp_constexpr has many values associated with it, taken from a number of different proposals.

◆ 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.

Equivalent SD-6 macro: __cpp_constinit

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.

Equivalent SD-6 macro: __cpp_deduction_guides. This token corresponds to the 201907L variant, but it will have the value of the latest supported variant, or 0 if this variant is not supported.

Remarks
__cpp_deduction_guides has at least 4 values associated with it, across at least 5 proposals.

◆ LBAL_CPP20_DEFAULT_CONSTRUCTIBLE_AND_ASSIGNABLE_STATELESS_LAMBDAS

#define LBAL_CPP20_DEFAULT_CONSTRUCTIBLE_AND_ASSIGNABLE_STATELESS_LAMBDAS

Equivalent SD-6 macro: none

◆ LBAL_CPP20_DEFAULT_MEMBER_INITIALIZERS_FOR_BIT_FIELDS

#define LBAL_CPP20_DEFAULT_MEMBER_INITIALIZERS_FOR_BIT_FIELDS

Equivalent SD-6 macro: none

◆ LBAL_CPP20_DESIGNATED_INITIALIZERS

#define LBAL_CPP20_DESIGNATED_INITIALIZERS

Equivalent SD-6 macro: __cpp_designated_initializers

◆ LBAL_CPP20_DESTROYING_DELETE

#define LBAL_CPP20_DESTROYING_DELETE

Efficient sized delete for variable sized classes.

Equivalent SD-6 macro: __cpp_impl_destroying_delete

◆ LBAL_CPP20_GENERIC_LAMBDAS_TEMPLATE_PARAMETER_LIST

#define LBAL_CPP20_GENERIC_LAMBDAS_TEMPLATE_PARAMETER_LIST

Generic (Polymorphic) Lambda Expressions.

Equivalent SD-6 macro: __cpp_generic_lambdas. This token corresponds to the 201707L variant, but it will have the value of the latest supported variant, or 0 if this variant is not supported.

◆ LBAL_CPP20_IMPL_COROUTINE

#define LBAL_CPP20_IMPL_COROUTINE

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

Equivalent SD-6 macro: __cpp_impl_coroutine

Remarks
Technically, the proposal this is from only directs that the Coroutines TS be merged into the Standard. For reference the latest draft is n4775 PDF.

◆ LBAL_CPP20_INIT_CAPTURES_PACK_EXPANSION

#define LBAL_CPP20_INIT_CAPTURES_PACK_EXPANSION

Allow pack-expansion in lambda init-capture.

Equivalent SD-6 macro: __cpp_init_captures. This token corresponds to the 201803L variant, but it will have the value of the latest supported variant, or 0 if this variant is not supported.

◆ LBAL_CPP20_INIT_STATEMENTS_FOR_RANGE_BASED_FOR

#define LBAL_CPP20_INIT_STATEMENTS_FOR_RANGE_BASED_FOR

Equivalent SD-6 macro: none

◆ LBAL_CPP20_INITIALIZER_LIST_CONSTRUCTORS_IN_CLASS_TEMPLATE_ARGUMENT_DEDUCTION

#define LBAL_CPP20_INITIALIZER_LIST_CONSTRUCTORS_IN_CLASS_TEMPLATE_ARGUMENT_DEDUCTION

Equivalent SD-6 macro: none

◆ LBAL_CPP20_INTEGRATING_OUR_FEATURE_TEST_MACROS

#define LBAL_CPP20_INTEGRATING_OUR_FEATURE_TEST_MACROS

Integrate universal feature test macros into the Standard.

Equivalent SD-6 macro: none (ironically)

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.

Equivalent SD-6 macro: __cpp_modules

◆ LBAL_CPP20_NONTYPE_TEMPLATE_ARGS_FIXES

#define LBAL_CPP20_NONTYPE_TEMPLATE_ARGS_FIXES

Address inconsistencies in handling of non-type template arguments.

Equivalent SD-6 macro: __cpp_nontype_template_args. This token corresponds to the 201911L variant, but it will have the value of the latest supported variant, or 0 if this variant is not supported.

◆ LBAL_CPP20_NONTYPE_TEMPLATE_PARAMETER_CLASS

#define LBAL_CPP20_NONTYPE_TEMPLATE_PARAMETER_CLASS

Class Types in Non-Type Template Parameters.

Equivalent SD-6 macro: __cpp_nontype_template_parameter_class

Remarks
SEEME There’s a slightly confusing note in the SD-6 document as of December 2019 which indicates a potential issue with this token. One interpretation is that an earlier version of the doc had incorrectly associated an unrelated proposal as an iteration on this feature; this is the interpretation we’re following.

◆ LBAL_CPP20_THREE_WAY_COMPARISON_OPERATOR

#define LBAL_CPP20_THREE_WAY_COMPARISON_OPERATOR

This is the original three-way comparison operator.

Equivalent SD-6 macro: __cpp_impl_three_way_comparison. This token corresponds to the 201711L variant, but it will have a value of 201907L if that variant is available.

◆ 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.

Equivalent SD-6 macro: __cpp_impl_three_way_comparison. This token corresponds to the 201902L variant, but it will have a value of 201907L if that variant is available.

◆ LBAL_CPP20_THREE_WAY_COMPARISON_OPERATOR_TUNEUP

#define LBAL_CPP20_THREE_WAY_COMPARISON_OPERATOR_TUNEUP

This is the updated three-way comparison operator.

Equivalent SD-6 macro: __cpp_impl_three_way_comparison. This token corresponds to the 201907L variant; it will only be set to a non-0 value if that variant is available.

◆ LBAL_CPP20_TYPENAME_OPTIONAL

#define LBAL_CPP20_TYPENAME_OPTIONAL

Equivalent SD-6 macro: none

◆ LBAL_CPP20_USING_ENUM

#define LBAL_CPP20_USING_ENUM

Specify using aliases for enums.

Equivalent SD-6 macro: __cpp_using_enum

◆ 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.

Equivalent SD-6 macro: none

Remarks
Ironically, MSVC has no implementation of this.

◆ LBAL_CPP98_EXCEPTIONS

#define LBAL_CPP98_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.

Equivalent SD-6 macro: __cpp_exceptions

  • 199711L

◆ LBAL_CPP98_RTTI

#define LBAL_CPP98_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.

Equivalent SD-6 macro: __cpp_rtti

  • 199711L

◆ LBAL_CPPTS_ATTRIBUTE_ASSERT

#define LBAL_CPPTS_ATTRIBUTE_ASSERT

Contracts: Assert Attribute.

This is one of a bundle of attributes using a new syntax. It takes the place of preprocessor-style asserts and serves the same purpose.

Equivalent SD-6 test: __has_cpp_attribute(assert)

Remarks
These were yoinked from C++20 prior to national balloting for various reasons and are currently back in the oven, but expected to pop in the C++23 Draft Standard.

◆ LBAL_CPPTS_ATTRIBUTE_ENSURES

#define LBAL_CPPTS_ATTRIBUTE_ENSURES

Contracts: Postcondition Attribute.

This is one of a bundle of attributes using a new syntax. It identifies function postconditions amd is intended to allow at least partial enforcement by a static analyzer.

Equivalent SD-6 test: __has_cpp_attribute(assert)

Remarks
These were yoinked from C++20 prior to national balloting for various reasons and are currently back in the oven, but expected to pop in the C++23 Draft Standard.

◆ LBAL_CPPTS_ATTRIBUTE_EXPECTS

#define LBAL_CPPTS_ATTRIBUTE_EXPECTS

Contracts: Precondition Attribute.

This is one of a bundle of attributes using a new syntax. It identifies function preconditions amd is intended to allow at least partial enforcement by a static analyzer.

Equivalent SD-6 test: __has_cpp_attribute(expects)

Remarks
These were yoinked from C++20 prior to national balloting for various reasons and are currently back in the oven, but expected to pop in the C++23 Draft Standard.

◆ LBAL_CPPTS_CONTRACTS

#define LBAL_CPPTS_CONTRACTS

Contracts.

This is actually a bundle of attributes using a new syntax; the syntax itself has no SD-6 macro, so we rely on the presence of the attributes to determine support. We track the availability of each attribute separately, as well as provide an aggregate to test for compliance. The aggregate’s value will be 0 if any attribute is unavailable, or 1 otherwise.

Equivalent SD-6 macro: none

Remarks
These were yoinked from C++20 prior to national balloting for various reasons and are currently back in the oven, but expected to pop in the C++23 Draft Standard.