summaryrefslogtreecommitdiff
path: root/src/constexpr_utils.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/constexpr_utils.hh')
-rw-r--r--src/constexpr_utils.hh3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/constexpr_utils.hh b/src/constexpr_utils.hh
index d9ba2abb..f83faacb 100644
--- a/src/constexpr_utils.hh
+++ b/src/constexpr_utils.hh
@@ -28,6 +28,9 @@ struct Array
T m_data[N];
};
+template<typename T, typename... U> requires (std::is_same_v<T, U> and ...)
+Array(T, U...) -> Array<T, 1 + sizeof...(U)>;
+
template<typename T, size_t N, size_t... Indices>
constexpr Array<T, N> make_array(const T (&data)[N], std::index_sequence<Indices...>)
{