[Glacier] Add a binary tree implementation.
Additionally add an optional class to return found values in the tree. And a reference container (Ref) similar to std::reference_wrapper to allow storing references in containers.
This commit is contained in:
parent
26b61db021
commit
98f029ae23
4 changed files with 234 additions and 0 deletions
|
|
@ -51,6 +51,8 @@ class RefPtr {
|
|||
T* get() const { return ptr_; };
|
||||
T& operator*() const { return *ptr_; }
|
||||
T* operator->() const { return ptr_; }
|
||||
|
||||
bool empty() const { return ptr_ == nullptr; }
|
||||
operator bool() const { return ptr_ != nullptr; }
|
||||
|
||||
bool operator==(decltype(nullptr)) const { return (ptr_ == nullptr); }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue