Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,8 @@
// ever deal with Apple LLVM versions with support for SD-6 macros.

// As of vanilla clang 8, this is disabled by default in order to avoid
// ABI-breaking changes. It’s unclear when it will be enabled by default.
// ABI-breaking changes. It’s unclear when it will be enabled by default (it
// has not been re-enabled by default as of clang 18).
//
// __SEEME__ This explicit test is here for documentation, but could
// actually be dropped as the common test will serve just as well.
Expand All @@ -219,9 +220,11 @@
// - __cpp_nontype_template_parameter_auto is undefined; testing
// suggests the feature is implemented; no tracking

// As of vanilla clang 8, this is disabled by default in order to avoid a
// defect introduced by the associated proposal (which was intended to
// resolve another defect).
// As of vanilla clang 8, this is disabled by default in order to avoid
// breaking code which was previously legal but is now malformed (thereby
// perpetuating the defect for over a decade in order to support a few
// months worth of bad code). To enable the DR fix, it is necessary to pass
// in `-frelaxed-template-template-args` to the compiler.
//
// __SEEME__ This explicit test is here for documentation, but could
// actually be dropped as the common test will serve just as well.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
equivalent SD-6 tokens are undefined; this can happen because the
implementation does not supply them, or because the feature in question is
unavailable. We resolve this here, if needed. Note that any situation that
would require us to pre-emptively disablea feature would have been handled
would require us to pre-emptively disable a feature would have been handled
previously in `lbalAppleClangInitialization.hpp`.
*/

Expand Down Expand Up @@ -86,6 +86,14 @@
#define LBAL_CPP20_INIT_STATEMENTS_FOR_RANGE_BASED_FOR 1L
#endif
#endif

#if (__clang_major__ >= 12) && (LBAL_cpp_version > LBAL_CPP17_VERSION)
// __SEEME__ There is no SD-6 token for this. Apple clang started
// supporting it initially in a bug fix in the Xcode 10-series.
#if !defined(LBAL_CPP20_DEFAULT_CONSTRUCTIBLE_AND_ASSIGNABLE_STATELESS_LAMBDAS)
#define LBAL_CPP20_DEFAULT_CONSTRUCTIBLE_AND_ASSIGNABLE_STATELESS_LAMBDAS 1L
#endif
#endif
#else
#error "lbalAppleClangPostInitialization.hpp was directly included while using the wrong compiler"
#endif
13 changes: 8 additions & 5 deletions include/lucenaBAL/details/compilers/lbalClangInitialization.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,9 @@
// C++14 features

// As of vanilla clang 8, this is disabled by default in order to avoid
// ABI-breaking changes. It’s unclear when it will be enabled by default.
//
// ABI-breaking changes. It’s unclear when it will be enabled by default (it
// has not been re-enabled by default as of clang 18).
//
// __SEEME__ This explicit test is here for documentation, but could
// actually be dropped as the common test will serve just as well.
#if (__cpp_sized_deallocation >= 201309L)
Expand All @@ -177,9 +178,11 @@

// C++17 features

// As of vanilla clang 8, this is disabled by default in order to avoid a
// defect introduced by the associated proposal (which was intended to
// resolve another defect).
// As of vanilla clang 8, this is disabled by default in order to avoid
// breaking code which was previously legal but is now malformed (thereby
// perpetuating the defect for over a decade in order to support a few
// months worth of bad code). To enable the DR fix, it is necessary to pass
// in `-frelaxed-template-template-args` to the compiler.
//
// __SEEME__ This explicit test is here for documentation, but could
// actually be dropped as the common test will serve just as well.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@
// version check and a language test. This will miss back-ported
// extensions, but will pick up preview implementations.

#if !defined(LBAL_CPP20_DEFAULT_CONSTRUCTIBLE_AND_ASSIGNABLE_STATELESS_LAMBDAS)
// __SEEME__ There is no SD-6 token for this.
#if !defined(LBAL_CPP20_DEFAULT_CONSTRUCTIBLE_AND_ASSIGNABLE_STATELESS_LAMBDAS)
#define LBAL_CPP20_DEFAULT_CONSTRUCTIBLE_AND_ASSIGNABLE_STATELESS_LAMBDAS 1L
#endif

Expand Down
5 changes: 5 additions & 0 deletions include/lucenaBAL/lbalFeatureSetup.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2671,6 +2671,11 @@
latest supported variant, or `0` if this variant is not supported.
- [201411L](https://wg21.link/n4268)
- [201911L](https://wg21.link/P1907R1)

@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.
*/
#ifndef LBAL_CPP20_NONTYPE_TEMPLATE_ARGS_FIXES
#define LBAL_CPP20_NONTYPE_TEMPLATE_ARGS_FIXES 0
Expand Down