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)=default | |
nullable & | operator= (const nullable &value)=default |
nullable & | operator= (T value) |
nullable & | operator= (std::nullptr_t) |
const T & | value () const |
T & | value () |
bool | has_value () const |
const T * | operator-> () const |
T * | operator-> () |
const T & | operator* () const |
T & | operator* () |
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, std::nullptr_t) |
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== (std::nullptr_t, const nullable< T2 > &rhs) |
template<typename T2 > | |
bool | operator!= (const nullable< T2 > &lhs, std::nullptr_t) |
template<typename T2 > | |
bool | operator!= (std::nullptr_t, const nullable< T2 > &rhs) |
Alternative to std::optional that supports reference (but not pointer) types.