From 79fb157cf81d790d49fda1c9ee2c67d90a1f0164 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Thu, 29 Dec 2022 00:02:45 +0000 Subject: constexpr collections helpers --- lib/collections.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/collections.hpp b/lib/collections.hpp index 5f4be68..c9b0127 100644 --- a/lib/collections.hpp +++ b/lib/collections.hpp @@ -3,7 +3,7 @@ #include template -std::array +constexpr std::array operator+(const std::array & a, const std::array & b) { std::array r; @@ -14,7 +14,7 @@ operator+(const std::array & a, const std::array & b) } template -auto +constexpr auto operator*(const std::array & in, auto && f) { std::array out; @@ -26,7 +26,7 @@ operator*(const std::array & in, auto && f) } template -auto & +constexpr auto & operator*=(std::array & in, auto && f) { for (const auto & v : in) { -- cgit v1.2.3