PoDoFo  1.0.0-dev
Public Member Functions | Friends | List of all members
PoDoFo::nullable< T, typename > Class Template Referencefinal

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
 
nullableoperator= (const nullable &value)=default
 
nullableoperator= (T value)
 
nullableoperator= (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)
 

Detailed Description

template<typename T, typename = std::enable_if_t<!std::is_pointer_v<T>>>
class PoDoFo::nullable< T, typename >

Alternative to std::optional that supports reference (but not pointer) types.


The documentation for this class was generated from the following file: