From baba2422ec39dbad853044034df043007ee595cc Mon Sep 17 00:00:00 2001 From: Giulio Eulisse <10544+ktf@users.noreply.github.com> Date: Wed, 14 Feb 2024 08:50:56 +0100 Subject: [PATCH] DPL: check for the maximum number of members supported for tasks --- Framework/Foundation/include/Framework/StructToTuple.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Framework/Foundation/include/Framework/StructToTuple.h b/Framework/Foundation/include/Framework/StructToTuple.h index 6d9a6a2ef305a..0ef3be4efcb3c 100644 --- a/Framework/Foundation/include/Framework/StructToTuple.h +++ b/Framework/Foundation/include/Framework/StructToTuple.h @@ -284,6 +284,7 @@ auto homogeneous_apply_refs(L l, T&& object) using type = std::decay_t; constexpr int nesting = B ? 1 : 0; constexpr unsigned long numElements = brace_constructible_size() - 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)