PoDoFo 1.0.0-dev
|
Alternative to std::optional that supports reference (but not pointer) types. More...
#include <nullable.h>
Public Member Functions | |
nullable (T value) | |
nullable (std::nullptr_t) | |
nullable (const nullable &value) | |
nullable & | operator= (const nullable &value) |
nullable & | operator= (T value) |
nullable & | operator= (std::nullptr_t) |
operator nullable< const T & > () const | |
const T & | value () const |
bool | has_value () const |
const T * | operator-> () const |
const T & | operator* () const |
operator const T * () const | |
Friends | |
template<typename T2 > | |
bool | operator== (const nullable< T2 > &lhs, const nullable< T2 > &rhs) |
template<typename T2 > | |
bool | operator!= (const nullable< T2 > &lhs, const nullable< T2 > &rhs) |
template<typename T2 > | |
bool | operator== (const nullable< std::decay_t< T2 > > &lhs, const nullable< T2 & > &rhs) |
template<typename T2 > | |
bool | operator!= (const nullable< std::decay_t< T2 > > &lhs, const nullable< T2 & > &rhs) |
template<typename T2 > | |
bool | operator== (const nullable< T2 & > &lhs, const nullable< std::decay_t< T2 > > &rhs) |
template<typename T2 > | |
bool | operator!= (const nullable< T2 & > &lhs, const nullable< std::decay_t< T2 > > &rhs) |
template<typename T2 > | |
bool | operator== (const nullable< T2 > &lhs, const T2 &rhs) |
template<typename T2 > | |
bool | operator== (const T2 &lhs, const nullable< T2 > &rhs) |
template<typename T2 > | |
bool | operator!= (const nullable< T2 > &lhs, const T2 &rhs) |
template<typename T2 > | |
bool | operator!= (const T2 &lhs, const nullable< T2 > &rhs) |
template<typename T2 > | |
std::enable_if_t<!std::is_reference_v< T2 >, bool > | operator== (const nullable< T2 > &lhs, std::nullptr_t) |
template<typename T2 > | |
std::enable_if_t<!std::is_reference_v< T2 >, bool > | operator== (std::nullptr_t, const nullable< T2 > &rhs) |
template<typename T2 > | |
std::enable_if_t<!std::is_reference_v< T2 >, bool > | operator!= (const nullable< T2 > &lhs, std::nullptr_t) |
template<typename T2 > | |
std::enable_if_t<!std::is_reference_v< T2 >, bool > | operator!= (std::nullptr_t, const nullable< T2 > &rhs) |
Alternative to std::optional that supports reference (but not pointer) types.