summaryrefslogtreecommitdiff
path: root/asl/containers
diff options
context:
space:
mode:
Diffstat (limited to 'asl/containers')
-rw-r--r--asl/containers/buffer.hpp8
-rw-r--r--asl/containers/hash_map.hpp2
-rw-r--r--asl/containers/intrusive_list.hpp4
3 files changed, 7 insertions, 7 deletions
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<copy_cref_t<decltype(self), T>>*;
+ using return_type = copy_const_t<un_ref_t<decltype(self)>, T>*;
// NOLINTNEXTLINE(*-reinterpret-cast)
auto&& buffer = reinterpret_cast<copy_cref_t<decltype(self), class buffer>>(self);
if constexpr (kInlineCapacity == 0)
@@ -410,13 +410,13 @@ public:
constexpr auto begin(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 contiguous_iterator<type>{self.data()};
}
constexpr auto end(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 contiguous_iterator<type>{self.data() + self.size()};
}
@@ -432,7 +432,7 @@ public:
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>{self.data(), self.size()};
}
diff --git a/asl/containers/hash_map.hpp b/asl/containers/hash_map.hpp
index dc140eb..a6d72dd 100644
--- a/asl/containers/hash_map.hpp
+++ b/asl/containers/hash_map.hpp
@@ -147,7 +147,7 @@ public:
auto get(this auto&& self, const U& value)
requires key_hasher<KeyHasher, U> && key_comparator<KeyComparator, K, U>
{
- using return_type = un_ref_t<copy_cref_t<decltype(self), V>>*;
+ using return_type = copy_const_t<un_ref_t<decltype(self)>, V>*;
isize_t index = self.find_slot_lookup(value);
if (index >= 0)
{
diff --git a/asl/containers/intrusive_list.hpp b/asl/containers/intrusive_list.hpp
index 81816ec..5ce69aa 100644
--- a/asl/containers/intrusive_list.hpp
+++ b/asl/containers/intrusive_list.hpp
@@ -82,13 +82,13 @@ public:
constexpr auto front(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 return_type{ self.m_head };
}
constexpr auto back(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 return_type{ self.m_head != nullptr ? self.m_head->m_prev : nullptr };
}