Skip to content

Commit

Permalink
DPL: make sure homogeneous_apply_ref complains when we are missing an…
Browse files Browse the repository at this point in the history
… explicit constructor
ktf committed Feb 14, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent d1e6ce2 commit 2e1c905
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Framework/Foundation/include/Framework/StructToTuple.h
Original file line number Diff line number Diff line change
@@ -135,10 +135,12 @@ struct UniversalType {
template <typename T>
consteval auto brace_constructible_size(auto... Members)
{
if constexpr (requires { T{Members...}; } == false)
if constexpr (requires { T{Members...}; } == false) {
static_assert(sizeof...(Members) != 0, "You need to make sure that you have implicit constructors or that you call the explicit constructor correctly.");
return sizeof...(Members) - 1;
else
} else {
return brace_constructible_size<T>(Members..., UniversalType{});
}
}
#else
template <typename T>

0 comments on commit 2e1c905

Please sign in to comment.