aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libs/kstd/include/kstd/vector8
1 files changed, 4 insertions, 4 deletions
diff --git a/libs/kstd/include/kstd/vector b/libs/kstd/include/kstd/vector
index d66c63b..2d148e4 100644
--- a/libs/kstd/include/kstd/vector
+++ b/libs/kstd/include/kstd/vector
@@ -384,7 +384,7 @@ namespace kstd
//! Get a reference to the first element of this vector.
//!
//! The behavior is undefined if this vector is empty.
- [[nodiscard]] auto front() const -> const_reference
+ [[nodiscard]] constexpr auto front() const -> const_reference
{
return *begin();
}
@@ -484,13 +484,13 @@ namespace kstd
}
//! Get a reverse iterator to the reverse end.
- [[nodiscard]] auto rend() const noexcept -> const_reverse_iterator
+ [[nodiscard]] constexpr auto rend() const noexcept -> const_reverse_iterator
{
return const_reverse_iterator{begin()};
}
//! Get a reverse iterator to the reverse end.
- [[nodiscard]] auto crend() const noexcept -> const_reverse_iterator
+ [[nodiscard]] constexpr auto crend() const noexcept -> const_reverse_iterator
{
return rend();
}
@@ -597,7 +597,7 @@ namespace kstd
//! Remove the last element of this vector.
//!
//! If this vector is empty, the behavior is undefined.
- auto pop_back() -> void
+ constexpr auto pop_back() -> void
{
--m_size;
std::allocator_traits<allocator_type>::destroy(m_allocator, data() + size());