diff --git a/include/rfl/internal/StringLiteral.hpp b/include/rfl/internal/StringLiteral.hpp index 03448d4e..3c59036a 100644 --- a/include/rfl/internal/StringLiteral.hpp +++ b/include/rfl/internal/StringLiteral.hpp @@ -3,6 +3,7 @@ #include #include +#include #include #include @@ -14,9 +15,11 @@ namespace internal { /// for the parameters names in the NamedTuples. template struct StringLiteral { - constexpr StringLiteral(const auto... _chars) - requires (std::is_same_v && ...) - : arr_{_chars..., '\0'} {} + /// Constrained via template type parameters rather than a requires-fold + /// over decltype of the function parameter pack: the latter crashes + /// clang 21/22 in C++26 mode (llvm/llvm-project#198052, #205000). + template ... Chars> + constexpr StringLiteral(const Chars... _chars) : arr_{_chars..., '\0'} {} constexpr StringLiteral(const std::array _arr) : arr_(_arr) {}