#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 29 of file not_null.hpp.
|
inlineexplicitconstexpr |
Definition at line 33 of file not_null.hpp.
|
inlineexplicitconstexpr |
Definition at line 39 of file not_null.hpp.
|
inlineconstexpr |
Definition at line 45 of file not_null.hpp.
|
inlineconstexpr |
Definition at line 49 of file not_null.hpp.
|
inlineconstexpr |
Definition at line 56 of file not_null.hpp.
|
inlineconstexpr |
Definition at line 76 of file not_null.hpp.
|
inlineconstexpr |
Definition at line 71 of file not_null.hpp.
|
inlineconstexpr |
Definition at line 81 of file not_null.hpp.
|
inlineconstexpr |
Definition at line 95 of file not_null.hpp.
|
inlineconstexpr |
Definition at line 87 of file not_null.hpp.
|
inlineconstexpr |
Definition at line 85 of file not_null.hpp.
|
inlineconstexpr |
Definition at line 90 of file not_null.hpp.