ROSE 0.11.145.147
Public Member Functions | List of all members
Sawyer::Nothing Class Reference

Description

Represents no value.

An object of type Nothing can be assigned to any Optional object to make it contain nothing.

Optional<int> opt3 = 123;
opt3 = Nothing();
Represents no value.
Definition Optional.h:36
Holds a value or nothing.
Definition Optional.h:56

Anything can be assigned to Nothing objects and nothing is stored:

Nothing nothing(123); // still empty after this
nothing = "testing"; // still empty after this

Definition at line 36 of file Optional.h.

#include <Sawyer/Optional.h>

Public Member Functions

template<class T >
 Nothing (T)
 
template<class T >
Nothingoperator= (T)
 
bool operator== (const Nothing &) const
 
bool operator!= (const Nothing &) const
 
bool operator> (const Nothing &) const
 
bool operator>= (const Nothing &) const
 
bool operator< (const Nothing &) const
 
bool operator<= (const Nothing &) const
 

Constructor & Destructor Documentation

◆ Nothing() [1/2]

Sawyer::Nothing::Nothing ( )
inline

Definition at line 38 of file Optional.h.

◆ Nothing() [2/2]

template<class T >
Sawyer::Nothing::Nothing ( )
inlineexplicit

Definition at line 39 of file Optional.h.

Member Function Documentation

◆ operator=()

template<class T >
Nothing & Sawyer::Nothing::operator= ( )
inline

Definition at line 40 of file Optional.h.

◆ operator==()

bool Sawyer::Nothing::operator== ( const Nothing ) const
inline

Definition at line 41 of file Optional.h.

◆ operator!=()

bool Sawyer::Nothing::operator!= ( const Nothing ) const
inline

Definition at line 42 of file Optional.h.

◆ operator>()

bool Sawyer::Nothing::operator> ( const Nothing ) const
inline

Definition at line 43 of file Optional.h.

◆ operator>=()

bool Sawyer::Nothing::operator>= ( const Nothing ) const
inline

Definition at line 44 of file Optional.h.

◆ operator<()

bool Sawyer::Nothing::operator< ( const Nothing ) const
inline

Definition at line 45 of file Optional.h.

◆ operator<=()

bool Sawyer::Nothing::operator<= ( const Nothing ) const
inline

Definition at line 46 of file Optional.h.


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