PoDoFo 1.0.0-dev
Loading...
Searching...
No Matches
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)
 
nullableoperator= (const nullable &value)
 
nullableoperator= (T value)
 
nullableoperator= (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 >, booloperator== (const nullable< T2 > &lhs, std::nullptr_t)
 
template<typename T2 >
std::enable_if_t<!std::is_reference_v< T2 >, booloperator== (std::nullptr_t, const nullable< T2 > &rhs)
 
template<typename T2 >
std::enable_if_t<!std::is_reference_v< T2 >, booloperator!= (const nullable< T2 > &lhs, std::nullptr_t)
 
template<typename T2 >
std::enable_if_t<!std::is_reference_v< T2 >, booloperator!= (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: