From 7fa0ae12574404debdd978cfec0541b98fab6d1e Mon Sep 17 00:00:00 2001 From: cyborg1811m Date: Thu, 21 Mar 2024 00:15:14 +0100 Subject: [PATCH] made clear constexpr --- include/const_list.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/const_list.h b/include/const_list.h index 6cd5f17..602b115 100644 --- a/include/const_list.h +++ b/include/const_list.h @@ -129,7 +129,7 @@ namespace cc { [[nodiscard]] constexpr size_type size() const noexcept { return _size; } [[nodiscard]] constexpr size_type max_size() const noexcept { return SIZE_MAX; } - void clear() noexcept; + constexpr void clear() noexcept; constexpr iterator insert(const_iterator pos, value_type& value) noexcept; constexpr iterator insert(const_list::const_iterator pos, std::initializer_list> values) noexcept; @@ -305,7 +305,7 @@ namespace cc { } template - void const_list::clear() noexcept + constexpr void const_list::clear() noexcept { for (auto node = _tail._next; _tail._next != std::addressof(_tail); ) { auto next = node->_next;