From 54affafd86e2b7f387345c08e8c7285c775d75e5 Mon Sep 17 00:00:00 2001 From: Steven Le Rouzic Date: Mon, 3 Mar 2025 23:53:14 +0100 Subject: Rename intrusive_list head & tail to front & back --- asl/containers/intrusive_list.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'asl/containers/intrusive_list.hpp') diff --git a/asl/containers/intrusive_list.hpp b/asl/containers/intrusive_list.hpp index ce0c133..fc911ec 100644 --- a/asl/containers/intrusive_list.hpp +++ b/asl/containers/intrusive_list.hpp @@ -80,13 +80,13 @@ public: } } - constexpr auto head(this auto&& self) + constexpr auto front(this auto&& self) { using return_type = un_ref_t>*; return return_type{ self.m_head }; } - constexpr auto tail(this auto&& self) + constexpr auto back(this auto&& self) { using return_type = un_ref_t>*; return return_type{ self.m_head != nullptr ? self.m_head->m_prev : nullptr }; @@ -178,13 +178,13 @@ public: auto begin(this auto&& self) { using iterator_type = select_t>, const_iterator, iterator>; - return iterator_type{ self.head(), self.is_empty() }; + return iterator_type{ self.front(), self.is_empty() }; } auto end(this auto&& self) { using iterator_type = select_t>, const_iterator, iterator>; - return iterator_type{ self.head(), true }; + return iterator_type{ self.front(), true }; } }; -- cgit