From 5688c721c610e2a8931d6ec6f84dee2d4d65c763 Mon Sep 17 00:00:00 2001 From: Claudius Holeksa Date: Tue, 27 Jun 2023 12:41:56 +0200 Subject: c++,codec,core: Added Union to KelSimple and fixed the native data type. Made some errors more clear as well --- src/core/templates.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/core/templates.h') diff --git a/src/core/templates.h b/src/core/templates.h index fcac61b..39befc1 100644 --- a/src/core/templates.h +++ b/src/core/templates.h @@ -16,7 +16,9 @@ struct parameter_pack_index { 1u + parameter_pack_index::value; }; -template struct parameter_pack_type; +template struct parameter_pack_type { + static_assert(always_false, "Should've been caught by the specializations"); +}; template struct parameter_pack_type<0, TN, T...> { using type = TN; @@ -25,6 +27,7 @@ template struct parameter_pack_type<0, TN, T...> { template struct parameter_pack_type { static_assert(sizeof...(T) > 0, "Exhausted parameters"); + static_assert(N > 0, "Invalid number. Should've been caught"); using type = typename parameter_pack_type::type; }; /* -- cgit v1.2.3