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/containers/buffer.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'asl/containers/buffer.hpp') diff --git a/asl/containers/buffer.hpp b/asl/containers/buffer.hpp index d61abf9..0e30745 100644 --- a/asl/containers/buffer.hpp +++ b/asl/containers/buffer.hpp @@ -392,7 +392,7 @@ public: auto data(this auto&& self) { - using return_type = un_ref_t>*; + using return_type = copy_const_t, T>*; // NOLINTNEXTLINE(*-reinterpret-cast) auto&& buffer = reinterpret_cast>(self); if constexpr (kInlineCapacity == 0) @@ -410,13 +410,13 @@ public: constexpr auto begin(this auto&& self) { - using type = un_ref_t>; + using type = copy_const_t, T>; return contiguous_iterator{self.data()}; } constexpr auto end(this auto&& self) { - using type = un_ref_t>; + using type = copy_const_t, T>; return contiguous_iterator{self.data() + self.size()}; } @@ -432,7 +432,7 @@ public: 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