#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 21 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 23 of file checked_pointer.hpp.
|
inlineexplicitconstexprnoexcept |
Definition at line 24 of file checked_pointer.hpp.
|
inline |
Definition at line 38 of file checked_pointer.hpp.
|
inline |
Definition at line 33 of file checked_pointer.hpp.
|
inlineexplicitconstexprnoexcept |
Definition at line 26 of file checked_pointer.hpp.
|
inline |
Definition at line 44 of file checked_pointer.hpp.
|
inline |
Definition at line 43 of file checked_pointer.hpp.
|
inline |
Definition at line 41 of file checked_pointer.hpp.
|
inline |
Definition at line 40 of file checked_pointer.hpp.