diff options
author | Steven Le Rouzic <steven.lerouzic@gmail.com> | 2025-03-14 18:53:37 +0100 |
---|---|---|
committer | Steven Le Rouzic <steven.lerouzic@gmail.com> | 2025-03-14 18:53:37 +0100 |
commit | 4630cb5237aea7749ac9938c738146c798e305cb (patch) | |
tree | 38ba9e41c3bf8408df97b7548ef112e2af61cd13 /asl/containers/buffer.hpp | |
parent | dce2c187ec96aedcfa703ffec9c4c91f0a49ca69 (diff) |
Add missing is_empty methods
Diffstat (limited to 'asl/containers/buffer.hpp')
-rw-r--r-- | asl/containers/buffer.hpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/asl/containers/buffer.hpp b/asl/containers/buffer.hpp index 0cad78f..bb32f89 100644 --- a/asl/containers/buffer.hpp +++ b/asl/containers/buffer.hpp @@ -273,6 +273,8 @@ public: return decode_size(load_size_encoded()); } + [[nodiscard]] constexpr bool is_empty() const { return size() == 0; } + [[nodiscard]] constexpr isize_t capacity() const { if constexpr (kInlineCapacity == 0) |