Support Class Library
A set of tools providing classes and utility
Public Member Functions | Public Attributes | List of all members
scl::utils::Either< Lhs, Rhs >::payload_t Struct Referencefinal

Payload type that encapsulates both alternatives. More...

#include "Either.h"

Collaboration diagram for scl::utils::Either< Lhs, Rhs >::payload_t:
Collaboration graph
[legend]

Public Member Functions

 payload_t ()=default
 
 ~payload_t ()=default
 
template<class = scl::tools::meta ::enable_if_t< Either::is_movable() >>
 payload_t (payload_t &&p)
 
template<class = scl::tools::meta ::enable_if_t< Either::is_copyable() >>
 payload_t (const payload_t &p)
 
template<class = scl::tools::meta ::void_t< scl::tools::meta ::enable_if_t< Either::is_copyable() > >>
payload_toperator= (const payload_t &p)
 
template<class = scl::tools::meta ::void_t< scl::tools::meta ::enable_if_t< Either::is_movable() > >>
payload_toperator= (payload_t &&p)
 

Public Attributes

Optional< Lhs > left = {}
 The holder of the left alternative. More...
 
Optional< Rhs > right = {}
 The holder of the right alternative. More...
 

Detailed Description

template<class Lhs, class Rhs>
struct scl::utils::Either< Lhs, Rhs >::payload_t

Payload type that encapsulates both alternatives.

Definition at line 50 of file Either.h.

Constructor & Destructor Documentation

◆ payload_t() [1/3]

template<class Lhs, class Rhs>
scl::utils::Either< Lhs, Rhs >::payload_t::payload_t ( )
default

◆ ~payload_t()

template<class Lhs, class Rhs>
scl::utils::Either< Lhs, Rhs >::payload_t::~payload_t ( )
default

◆ payload_t() [2/3]

template<class Lhs, class Rhs>
template<class = scl::tools::meta ::enable_if_t< Either::is_movable() >>
scl::utils::Either< Lhs, Rhs >::payload_t::payload_t ( payload_t &&  p)
inlineexplicit

Definition at line 69 of file Either.h.

◆ payload_t() [3/3]

template<class Lhs, class Rhs>
template<class = scl::tools::meta ::enable_if_t< Either::is_copyable() >>
scl::utils::Either< Lhs, Rhs >::payload_t::payload_t ( const payload_t p)
inlineexplicit

Definition at line 75 of file Either.h.

Member Function Documentation

◆ operator=() [1/2]

template<class Lhs, class Rhs>
template<class = scl::tools::meta ::void_t< scl::tools::meta ::enable_if_t< Either::is_copyable() > >>
payload_t& scl::utils::Either< Lhs, Rhs >::payload_t::operator= ( const payload_t p)
inline

Definition at line 83 of file Either.h.

◆ operator=() [2/2]

template<class Lhs, class Rhs>
template<class = scl::tools::meta ::void_t< scl::tools::meta ::enable_if_t< Either::is_movable() > >>
payload_t& scl::utils::Either< Lhs, Rhs >::payload_t::operator= ( payload_t &&  p)
inline

Definition at line 94 of file Either.h.

Member Data Documentation

◆ left

template<class Lhs, class Rhs>
scl::utils::Either< Lhs, Rhs >::payload_t::left = {}

The holder of the left alternative.

Definition at line 55 of file Either.h.

◆ right

template<class Lhs, class Rhs>
scl::utils::Either< Lhs, Rhs >::payload_t::right = {}

The holder of the right alternative.

Definition at line 61 of file Either.h.


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