ORIGINAL
Loading...
Searching...
No Matches
original::alternative< void > Class Reference
Collaboration diagram for original::alternative< void >:
Collaboration graph

Public Member Functions

 alternative ()
 Constructs an empty alternative<void>
 
 alternative (none n)
 Constructs from none (empty state)
 
 alternative (std::in_place_t t)
 Constructs with value present.
 
void set ()
 Sets the alternative to have a value.
 
void reset () noexcept
 Resets to empty state.
 
bool hasValue () const
 Checks if contains a value.
 
 operator bool () const
 Boolean conversion operator.
 
 alternative (const alternative &other)=default
 Default copy constructor.
 
alternativeoperator= (const alternative &other)=default
 Default copy assignment.
 
 alternative (alternative &&other) noexcept=default
 Default move constructor.
 
alternativeoperator= (alternative &&other) noexcept=default
 Default move assignment.
 
 ~alternative ()=default
 Default destructor.
 

Constructor & Destructor Documentation

◆ alternative() [1/3]

original::alternative< void >::alternative ( )
inlineexplicitdefault

Constructs an empty alternative<void>

Postcondition
hasValue() == false

◆ alternative() [2/3]

original::alternative< void >::alternative ( none n)
inlineexplicit

Constructs from none (empty state)

Parameters
nnone value indicating empty state
Postcondition
hasValue() == false

◆ alternative() [3/3]

original::alternative< void >::alternative ( std::in_place_t t)
inlineexplicit

Constructs with value present.

Parameters
tstd::in_place_t tag to indicate value should be present
Postcondition
hasValue() == true

Member Function Documentation

◆ hasValue()

bool original::alternative< void >::hasValue ( ) const
inlinenodiscard

Checks if contains a value.

Returns
true if contains value, false if empty

◆ operator bool()

original::alternative< void >::operator bool ( ) const
inlineexplicit

Boolean conversion operator.

Returns
true if contains value, false if empty

◆ reset()

void original::alternative< void >::reset ( )
inlinenoexcept

Resets to empty state.

Postcondition
hasValue() == false

◆ set()

void original::alternative< void >::set ( )
inline

Sets the alternative to have a value.

Postcondition
hasValue() == true

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