Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please consider the following formatting changes to #12701 #267

Closed
wants to merge 2 commits into from
Closed
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
7 changes: 5 additions & 2 deletions Framework/Foundation/include/Framework/StructToTuple.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -282,6 +284,7 @@ auto homogeneous_apply_refs(L l, T&& object)
using type = std::decay_t<T>;
constexpr int nesting = B ? 1 : 0;
constexpr unsigned long numElements = brace_constructible_size<type>() - nesting;
static_assert(numElements < 99, "Too many elements in the struct");
// clang-format off
if DPL_HOMOGENEOUS_APPLY_ENTRY (9, 9)
else if DPL_HOMOGENEOUS_APPLY_ENTRY (9, 8)
Expand Down
Loading