From d92d4d113c3d27e8c63dbb4c88d799fe04e43045 Mon Sep 17 00:00:00 2001 From: CommanderRedYT Date: Sat, 23 Sep 2023 10:08:33 +0200 Subject: [PATCH] Implemented ability to just pass the array --- src/arrayview.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/arrayview.h b/src/arrayview.h index 1a536b3..609d428 100644 --- a/src/arrayview.h +++ b/src/arrayview.h @@ -33,6 +33,11 @@ struct ArrayView m_begin{begin}, m_end{begin + size} {} + template + constexpr explicit ArrayView(value_type (&array)[N]) noexcept : + m_begin{array}, m_end{array + N} + {} + constexpr ArrayView(const ArrayView &other) noexcept : m_begin{other.m_begin}, m_end{other.m_end} {}