diff options
author | Steven Le Rouzic <steven.lerouzic@gmail.com> | 2025-05-14 00:23:11 +0200 |
---|---|---|
committer | Steven Le Rouzic <steven.lerouzic@gmail.com> | 2025-05-14 00:41:51 +0200 |
commit | f7a2699ac0cbb2824862439a72f23013436484de (patch) | |
tree | 8e8c63332b8b4ae188a3f41391cadf16145bbed5 /asl/types/array.hpp | |
parent | 088e03708afe4145a1903f0b20c53cab1899ad50 (diff) |
Add and use copy_const_t
Diffstat (limited to 'asl/types/array.hpp')
-rw-r--r-- | asl/types/array.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
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<copy_cref_t<decltype(self), T>>*; + using return_type = copy_const_t<un_ref_t<decltype(self)>, T>*; return static_cast<return_type>(self.m_data); } @@ -54,7 +54,7 @@ struct array constexpr auto as_span(this auto&& self) { - using type = un_ref_t<copy_cref_t<decltype(self), T>>; + using type = copy_const_t<un_ref_t<decltype(self)>, T>; return span<type, kSize>{self.data(), self.size()}; } |