#include <userver/utils/not_null.hpp>
Restricts a pointer or smart pointer to only hold non-null values.
Definition at line 21 of file not_null.hpp.
Public Member Functions | |
constexpr | NotNull (const T &u) |
constexpr | NotNull (T &&u) |
template<typename U , typename = std::enable_if_t<std::is_convertible_v<U, T>>> | |
constexpr | NotNull (U &&u) |
template<typename U , typename = std::enable_if_t<std::is_convertible_v<U*, T>>> | |
constexpr | NotNull (U &u) |
template<typename U , typename = std::enable_if_t<std::is_convertible_v<U, T>>> | |
constexpr | NotNull (const NotNull< U > &other) |
template<typename U , typename = std::enable_if_t<std::is_convertible_v<U, T>>> | |
constexpr | NotNull (NotNull< U > &&other) |
constexpr | NotNull (std::nullptr_t)=delete |
NotNull (const NotNull &other) noexcept=default | |
NotNull (NotNull &&other) noexcept=default | |
NotNull & | operator= (const NotNull &other) noexcept=default |
NotNull & | operator= (NotNull &&other) noexcept=default |
constexpr NotNull & | operator= (std::nullptr_t)=delete |
constexpr const T & | GetBase () const & |
constexpr T && | GetBase () && |
constexpr | operator const T & () const & |
constexpr | operator bool ()=delete |
constexpr decltype(auto) | operator-> () const & |
constexpr decltype(auto) | operator* () const & |
template<typename U > | |
constexpr bool | operator== (const NotNull< U > &other) const & |
template<typename U > | |
constexpr bool | operator!= (const NotNull< U > &other) const & |
|
inlineexplicitconstexpr |
Definition at line 28 of file not_null.hpp.
|
inlineexplicitconstexpr |
Definition at line 30 of file not_null.hpp.
|
inlineexplicitconstexpr |
Definition at line 35 of file not_null.hpp.
|
inlineconstexpr |
Definition at line 40 of file not_null.hpp.
|
inlineconstexpr |
Definition at line 43 of file not_null.hpp.
|
inlineconstexpr |
Definition at line 48 of file not_null.hpp.
|
inlineconstexpr |
Definition at line 67 of file not_null.hpp.
|
inlineconstexpr |
Definition at line 62 of file not_null.hpp.
|
inlineconstexpr |
Definition at line 72 of file not_null.hpp.
|
inlineconstexpr |
Definition at line 86 of file not_null.hpp.
|
inlineconstexpr |
Definition at line 78 of file not_null.hpp.
|
inlineconstexpr |
Definition at line 76 of file not_null.hpp.
|
inlineconstexpr |
Definition at line 81 of file not_null.hpp.