sparrow 0.3.0
Loading...
Searching...
No Matches
sparrow::nullable_variant< T > Class Template Reference

variant of nullable, exposing has_value for convenience More...

#include <nullable.hpp>

Inheritance diagram for sparrow::nullable_variant< T >:
[legend]
Collaboration diagram for sparrow::nullable_variant< T >:
[legend]

Public Types

using base_type = std::variant<T...>
 

Public Member Functions

constexpr nullable_variant (const nullable_variant &)=default
 
constexpr nullable_variant (nullable_variant &&) noexcept=default
 
constexpr nullable_variantoperator= (const nullable_variant &)
 
constexpr nullable_variantoperator= (nullable_variant &&)
 
constexpr operator bool () const
 
constexpr bool has_value () const
 

Detailed Description

template<class... T>
requires (is_nullable_v<T> && ...)
class sparrow::nullable_variant< T >

variant of nullable, exposing has_value for convenience

Template Parameters
Tthe list of nullable in the variant

Definition at line 512 of file nullable.hpp.

Member Typedef Documentation

◆ base_type

template<class... T>
using sparrow::nullable_variant< T >::base_type = std::variant<T...>

Definition at line 516 of file nullable.hpp.

Constructor & Destructor Documentation

◆ nullable_variant() [1/2]

template<class... T>
sparrow::nullable_variant< T >::nullable_variant ( const nullable_variant< T > & )
constexprdefault
Here is the call graph for this function:
Here is the caller graph for this function:

◆ nullable_variant() [2/2]

template<class... T>
sparrow::nullable_variant< T >::nullable_variant ( nullable_variant< T > && )
constexprdefaultnoexcept
Here is the call graph for this function:

Member Function Documentation

◆ has_value()

template<class... T>
requires (is_nullable_v<T> && ...)
bool sparrow::nullable_variant< T >::has_value ( ) const
constexpr

Definition at line 782 of file nullable.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator bool()

template<class... T>
requires (is_nullable_v<T> && ...)
sparrow::nullable_variant< T >::operator bool ( ) const
explicitconstexpr

Definition at line 775 of file nullable.hpp.

Here is the call graph for this function:

◆ operator=() [1/2]

template<class... T>
requires (is_nullable_v<T> && ...)
nullable_variant< T... > & sparrow::nullable_variant< T >::operator= ( const nullable_variant< T > & rhs)
constexpr

Definition at line 759 of file nullable.hpp.

Here is the call graph for this function:

◆ operator=() [2/2]

template<class... T>
requires (is_nullable_v<T> && ...)
nullable_variant< T... > & sparrow::nullable_variant< T >::operator= ( nullable_variant< T > && rhs)
constexpr

Definition at line 767 of file nullable.hpp.

Here is the call graph for this function:

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