From 86f2ca87222e59fb0b89b2f2a6b422a58a2e0892 Mon Sep 17 00:00:00 2001 From: Merry Date: Sun, 10 Jul 2022 09:32:24 +0100 Subject: [PATCH] list: Make constexpr --- include/oaknut/impl/list.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/oaknut/impl/list.hpp b/include/oaknut/impl/list.hpp index 79cc99e..9ad4bd9 100644 --- a/include/oaknut/impl/list.hpp +++ b/include/oaknut/impl/list.hpp @@ -32,7 +32,7 @@ struct BaseOnlyTag {}; template struct List { template - explicit List(U... args) + constexpr explicit List(U... args) : m_base(std::get<0>(std::tie(args...))) { static_assert((std::is_same_v && ...)); @@ -55,12 +55,12 @@ private: template friend struct List; - explicit List(detail::BaseOnlyTag, T base_) + constexpr explicit List(detail::BaseOnlyTag, T base_) : m_base(base_) {} template - bool verify(std::index_sequence, U... args) + constexpr bool verify(std::index_sequence, U... args) { if constexpr (std::is_base_of_v) { return (((m_base.index() + indexes) % 32 == static_cast(args.index())) && ...);