lucenaBAL
2.0.0.20
Lucena Build Abstraction Library for C++
|
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.
| |
#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.
| |
#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 |
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, or1
, if there is no equivalent SD-6 macroNote that these tokens are neither exhaustive nor bounded:
0
value depends on the feature’s availability at build time.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.
__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
.#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.
#define LBAL_CPP11_ALIAS_TEMPLATES |
#define LBAL_CPP11_ATTRIBUTE_CARRIES_DEPENDENCY |
Optimization hint when compiling with certain memory models.
Equivalent SD-6 test: __has_cpp_attribute(carries_dependency)
#define LBAL_CPP11_ATTRIBUTE_NORETURN |
Indicate that a function does not return.
Equivalent SD-6 test: __has_cpp_attribute(noreturn)
#define LBAL_CPP11_ATTRIBUTES |
#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.
__cpp_constexpr
has many values associated with it, taken from a number of different proposals. #define LBAL_CPP11_DECLTYPE |
#define LBAL_CPP11_DELEGATING_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.
__cpp_inheriting_constructors
has at least 2 values associated with it, each from a different proposal. #define LBAL_CPP11_INITIALIZER_LISTS |
#define LBAL_CPP11_LAMBDAS |
#define LBAL_CPP11_MINIMAL_GARBAGE_COLLECTION |
#define LBAL_CPP11_NSDMI |
#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.
__cpp_range_based_for
has at least 2 values associated with it, each from a different proposal. #define LBAL_CPP11_RAW_STRINGS |
#define LBAL_CPP11_REF_QUALIFIERS |
#define LBAL_CPP11_RVALUE_REFERENCES |
#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.
__cpp_static_assert
has at least 2 values associated with it, each from a different proposal. #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
#define LBAL_CPP11_UNICODE_CHARACTERS |
Add char16_t
and char32_t
with requisite Unicode encoding.
Equivalent SD-6 macro: __cpp_unicode_characters
#define LBAL_CPP11_UNICODE_LITERALS |
#define LBAL_CPP11_USER_DEFINED_LITERALS |
#define LBAL_CPP11_VARIADIC_TEMPLATES |
Support for templates with variable numbers of arguments.
Equivalent SD-6 macro: __cpp_variadic_templates
#define LBAL_CPP14_AGGREGATE_NSDMI |
Relax the requirements on aggregates and specify aggregate member initialization.
Equivalent SD-6 macro: __cpp_aggregate_nsdmi
#define LBAL_CPP14_ATTRIBUTE_DEPRECATED |
Support for marking symbols as deprecated.
Equivalent SD-6 test: __has_cpp_attribute(deprecated)
#define LBAL_CPP14_BINARY_LITERALS |
#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.
__cpp_constexpr
has many values associated with it, taken from a number of different proposals. #define LBAL_CPP14_DECLTYPE_AUTO |
#define LBAL_CPP14_GENERIC_LAMBDAS |
#define LBAL_CPP14_INIT_CAPTURES |
#define LBAL_CPP14_RETURN_TYPE_DEDUCTION |
Support for return type deduction for normal functions.
Equivalent SD-6 macro: __cpp_return_type_deduction
#define LBAL_CPP14_SIZED_DEALLOCATION |
Make available a global operator delete
that takes a size argument.
Equivalent SD-6 macro: __cpp_sized_deallocation
#define LBAL_CPP14_VARIABLE_TEMPLATES |
#define LBAL_CPP17_AGGREGATE_BASES |
Relax the restrictions on aggregate initialization.
Equivalent SD-6 macro: __cpp_aggregate_bases
#define LBAL_CPP17_ALIGNED_NEW |
Specify handling of dynamic memory allocation for over-aligned data.
Equivalent SD-6 macro: __cpp_aligned_new
#define LBAL_CPP17_ATTRIBUTE_FALLTHROUGH |
Indicate that a case within a switch statements falls through.
Equivalent SD-6 test: __has_cpp_attribute(fallthrough)
#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)
#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.
nodiscard
attribute has at least 2 values associated with it, from a number of different proposals. #define LBAL_CPP17_CAPTURE_STAR_THIS |
Allow lambda capture of *this
by value as as [=,*this]
.
Equivalent SD-6 macro: __cpp_capture_star_this
#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.
__cpp_constexpr
has many values associated with it, taken from a number of different proposals. #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.
__cpp_deduction_guides
has at least 4 values associated with it, across at least 5 proposals. #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.
__cpp_deduction_guides
has at least 4 values associated with it, across at least 5 proposals. #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.
__cpp_deduction_guides
has at least 4 values associated with it, across at least 5 proposals. #define LBAL_CPP17_ENUMERATOR_ATTRIBUTES |
#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.
__cpp_fold_expressions
has at least 2 values associated with it, across at least 2 proposals. #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.
__cpp_fold_expressions
has at least 2 values associated with it, across at least 2 proposals. #define LBAL_CPP17_GUARANTEED_COPY_ELISION |
Guarantee copy and move elision in well-defined situations.
Equivalent SD-6 macro: __cpp_guaranteed_copy_elision
#define LBAL_CPP17_HEX_FLOAT |
#define LBAL_CPP17_IF_CONSTEXPR |
#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.
__cpp_inheriting_constructors
has at least 2 values associated with it, each from a different proposal. #define LBAL_CPP17_INLINE_VARIABLES |
#define LBAL_CPP17_NAMESPACE_ATTRIBUTES |
#define LBAL_CPP17_NOEXCEPT_FUNCTION_TYPE |
Make exception specifications be part of the type system.
Equivalent SD-6 macro: __cpp_noexcept_function_type
#define LBAL_CPP17_NONTYPE_TEMPLATE_ARGS |
#define LBAL_CPP17_NONTYPE_TEMPLATE_PARAMETER_AUTO |
Allow declaring non-type template arguments with auto.
Equivalent SD-6 macro: __cpp_nontype_template_parameter_auto
#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.
__cpp_range_based_for
has at least 2 values associated with it, each from a different proposal. #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.
__cpp_static_assert
has at least 2 values associated with it, each from a different proposal. #define LBAL_CPP17_STRUCTURED_BINDINGS |
Add support for multiple function return values and more.
Equivalent SD-6 macro: __cpp_structured_bindings
#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
#define LBAL_CPP17_VARIADIC_USING |
Add support for pack expansions in using-declarations.
Equivalent SD-6 macro: __cpp_variadic_using
#define LBAL_CPP20_AGGREGATE_PAREN_INIT |
Allow aggregate initialization from parentheses as well as braces.
Equivalent SD-6 macro: __cpp_aggregate_paren_init
#define LBAL_CPP20_ALLOW_LAMBDA_CAPTURE_EQUALS_THIS |
Equivalent SD-6 macro: none
#define LBAL_CPP20_ATTRIBUTE_LIKELY |
Equivalent SD-6 test: __has_cpp_attribute(likely)
#define LBAL_CPP20_ATTRIBUTE_NO_UNIQUE_ADDRESS |
Equivalent SD-6 macro: __has_cpp_attribute(no_unique_address)
#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.
nodiscard
attribute has at least 2 values associated with it, from a number of different proposals. #define LBAL_CPP20_ATTRIBUTE_UNLIKELY |
Equivalent SD-6 test: __has_cpp_attribute(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
#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
#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.
__cpp_concepts
has at least 3 values associated with it, each from a different proposal.#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.
__cpp_concepts
has at least 3 values associated with it, each from a different proposal.#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.
__cpp_concepts
has at least 3 values associated with it, each from a different proposal.#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
#define LBAL_CPP20_CONST_REF_QUALIFIED_POINTERS_TO_MEMBERS |
Equivalent SD-6 macro: none
#define LBAL_CPP20_CONSTEVAL |
#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
#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.
__cpp_constexpr
has many values associated with it, taken from a number of different proposals. LBAL_CPP20_CONSTEXPR_DYNAMIC_POLYMORPHISM
and LBAL_CPP20_CONSTEXPR_UNION_ALTERATION
variants are aliases for each other. #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.
#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.
__cpp_constexpr
has many values associated with it, taken from a number of different proposals. LBAL_CPP20_CONSTEXPR_TRIVIAL_DEFAULT_INITIALIZATION
variant are aliases for each other. #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.
__cpp_constexpr
has many values associated with it, taken from a number of different proposals. LBAL_CPP20_CONSTEXPR_INTRINSICS
variant are aliases for each other. #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.
__cpp_constexpr
has many values associated with it, taken from a number of different proposals. LBAL_CPP20_CONSTEXPR_DYNAMIC_POLYMORPHISM
and LBAL_CPP20_CONSTEXPR_UNION_ALTERATION
variants are aliases for each other. #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.
__cpp_constexpr
has many values associated with it, taken from a number of different proposals. LBAL_CPP20_CONSTEXPR_DYNAMIC_POLYMORPHISM
and LBAL_CPP20_CONSTEXPR_TRY_CATCH
variants are aliases for each other. #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.
__cpp_constexpr
has many values associated with it, taken from a number of different proposals. #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
__cpp_constinit
will be set even if the dialect is older than C++20. #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.
__cpp_deduction_guides
has at least 4 values associated with it, across at least 5 proposals. #define LBAL_CPP20_DEFAULT_CONSTRUCTIBLE_AND_ASSIGNABLE_STATELESS_LAMBDAS |
Equivalent SD-6 macro: none
#define LBAL_CPP20_DEFAULT_MEMBER_INITIALIZERS_FOR_BIT_FIELDS |
Equivalent SD-6 macro: none
#define LBAL_CPP20_DESIGNATED_INITIALIZERS |
Equivalent SD-6 macro: __cpp_designated_initializers
#define LBAL_CPP20_DESTROYING_DELETE |
Efficient sized delete for variable sized classes.
Equivalent SD-6 macro: __cpp_impl_destroying_delete
#define LBAL_CPP20_GENERIC_LAMBDAS_TEMPLATE_PARAMETER_LIST |
#define LBAL_CPP20_IMPL_COROUTINE |
#define LBAL_CPP20_INIT_CAPTURES_PACK_EXPANSION |
#define LBAL_CPP20_INIT_STATEMENTS_FOR_RANGE_BASED_FOR |
Equivalent SD-6 macro: none
#define LBAL_CPP20_INITIALIZER_LIST_CONSTRUCTORS_IN_CLASS_TEMPLATE_ARGUMENT_DEDUCTION |
Equivalent SD-6 macro: none
#define LBAL_CPP20_INTEGRATING_OUR_FEATURE_TEST_MACROS |
Integrate universal feature test macros into the Standard.
Equivalent SD-6 macro: none (ironically)
#define LBAL_CPP20_MODULES |
#define LBAL_CPP20_NONTYPE_TEMPLATE_ARGS_FIXES |
#define LBAL_CPP20_NONTYPE_TEMPLATE_PARAMETER_CLASS |
Class Types in Non-Type Template Parameters.
Equivalent SD-6 macro: __cpp_nontype_template_parameter_class
#define LBAL_CPP20_THREE_WAY_COMPARISON_OPERATOR |
#define LBAL_CPP20_THREE_WAY_COMPARISON_OPERATOR_EQUALITY_FIX |
#define LBAL_CPP20_THREE_WAY_COMPARISON_OPERATOR_TUNEUP |
#define LBAL_CPP20_TYPENAME_OPTIONAL |
Equivalent SD-6 macro: none
#define LBAL_CPP20_USING_ENUM |
#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
#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
#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
#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)
#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)
#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)
#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