diff --git a/include/bpptree/bpptree.hpp b/include/bpptree/bpptree.hpp index 7dfc317..c15c013 100644 --- a/include/bpptree/bpptree.hpp +++ b/include/bpptree/bpptree.hpp @@ -95,19 +95,19 @@ class BppTreeDetail { using IteratorType = IteratorDetail; public: - [[nodiscard]] size_t size() { + [[nodiscard]] size_t size() const { return tree_size; } - [[nodiscard]] constexpr size_t max_size() { + [[nodiscard]] constexpr size_t max_size() const { return max_size_v; } - [[nodiscard]] size_t depth() { + [[nodiscard]] size_t depth() const { return std::as_const(this->self()).dispatch([](auto const& root){ return static_cast(root->depth); }); } - [[nodiscard]] constexpr size_t max_depth() { + [[nodiscard]] constexpr size_t max_depth() const { return max_depth_v; }