From f7a2699ac0cbb2824862439a72f23013436484de Mon Sep 17 00:00:00 2001 From: Steven Le Rouzic Date: Wed, 14 May 2025 00:23:11 +0200 Subject: Add and use copy_const_t --- asl/types/array.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'asl/types/array.hpp') diff --git a/asl/types/array.hpp b/asl/types/array.hpp index 5fb300a..54c3fbe 100644 --- a/asl/types/array.hpp +++ b/asl/types/array.hpp @@ -19,12 +19,12 @@ struct array T m_data[kSize]; [[nodiscard]] constexpr bool is_empty() const { return false; } - + [[nodiscard]] constexpr int64_t size() const { return kSize; } constexpr auto data(this auto&& self) { - using return_type = un_ref_t>*; + using return_type = copy_const_t, T>*; return static_cast(self.m_data); } @@ -54,7 +54,7 @@ struct array constexpr auto as_span(this auto&& self) { - using type = un_ref_t>; + using type = copy_const_t, T>; return span{self.data(), self.size()}; } -- cgit