diff options
author | Tor Egge <Tor.Egge@online.no> | 2024-06-04 12:03:08 +0200 |
---|---|---|
committer | Tor Egge <Tor.Egge@online.no> | 2024-06-04 12:03:08 +0200 |
commit | 38184a5880b31f24284eb12c81afbcdc9d29bf8b (patch) | |
tree | 59593b032e032db66fa2ec3b5122856e6a3795ec /vespalib | |
parent | a434ad67c080420b6261666acc2d27beaf421b3b (diff) |
Add get method to vespalib::ref_counted
Diffstat (limited to 'vespalib')
-rw-r--r-- | vespalib/src/vespa/vespalib/util/ref_counted.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/vespalib/src/vespa/vespalib/util/ref_counted.h b/vespalib/src/vespa/vespalib/util/ref_counted.h index 1992bdaa5a8..3daa8bbff99 100644 --- a/vespalib/src/vespa/vespalib/util/ref_counted.h +++ b/vespalib/src/vespa/vespalib/util/ref_counted.h @@ -96,6 +96,7 @@ public: } T *operator->() const noexcept { return _ptr; } T &operator*() const noexcept { return *_ptr; } + T* get() const noexcept { return _ptr; } operator bool() const noexcept { return (_ptr != nullptr); } void reset() noexcept { replace_with(nullptr); } ~ref_counted() noexcept { maybe_subref(); } |