#include <userver/utils/checked_pointer.hpp>
Utility template for returning a pointer to an object that is owned by someone else; throws std::runtime_error if nullptr is stored.
Useful for returning cache search result.
Definition at line 22 of file checked_pointer.hpp.
Public Member Functions | |
constexpr | CheckedPtr (std::nullptr_t) noexcept |
constexpr | CheckedPtr (T *ptr) noexcept |
constexpr | operator bool () const noexcept |
T * | Get () const & |
T * | Get () && |
T * | operator-> () const & |
T * | operator-> () && |
T & | operator* () const & |
T & | operator* () && |
|
inlineconstexprnoexcept |
Definition at line 24 of file checked_pointer.hpp.
|
inlineexplicitconstexprnoexcept |
Definition at line 25 of file checked_pointer.hpp.
|
inline |
Definition at line 39 of file checked_pointer.hpp.
|
inline |
Definition at line 34 of file checked_pointer.hpp.
|
inlineexplicitconstexprnoexcept |
Definition at line 27 of file checked_pointer.hpp.
|
inline |
Definition at line 45 of file checked_pointer.hpp.
|
inline |
Definition at line 44 of file checked_pointer.hpp.
|
inline |
Definition at line 42 of file checked_pointer.hpp.
|
inline |
Definition at line 41 of file checked_pointer.hpp.