Skip to content

Commit 7940f6c

Browse files
committed
DPL: make sure homogeneous_apply_ref complains when we are missing an explicit constructor
1 parent d1e6ce2 commit 7940f6c

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

Framework/Foundation/include/Framework/StructToTuple.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,12 @@ struct UniversalType {
135135
template <typename T>
136136
consteval auto brace_constructible_size(auto... Members)
137137
{
138-
if constexpr (requires { T{Members...}; } == false)
138+
if constexpr (requires { T{Members...}; } == false) {
139+
static_assert(sizeof...(Members) != 0, "You need to make sure that you have implicit constructors or that you call the explicit constructor correctly.");
139140
return sizeof...(Members) - 1;
140-
else
141+
} else {
141142
return brace_constructible_size<T>(Members..., UniversalType{});
143+
}
142144
}
143145
#else
144146
template <typename T>

0 commit comments

Comments
 (0)