Loading...
Searching...
No Matches
Catch::Optional< T > Class Template Reference

`#include <catch_amalgamated.hpp>`

## Public Member Functions

| Optional ()
| ~Optional ()
| Optional (T const &_value)
| Optional (T &&_value)
Optional & | operator= (T const &_value)
Optional & | operator= (T &&_value)
| Optional (Optional const &_other)
| Optional (Optional &&_other)
Optional & | operator= (Optional const &_other)
Optional & | operator= (Optional &&_other)
void | reset ()
T & | operator* ()
T const & | operator* () const
T * | operator-> ()
const T * | operator-> () const
T | valueOr (T const &defaultValue) const
bool | some () const
bool | none () const
bool | operator! () const
| operator bool () const

## Private Attributes

T * | nullableValue
char | storage [sizeof(T)]

## Friends

bool | operator== (Optional const &a, Optional const &b)
bool | operator!= (Optional const &a, Optional const &b)

## Constructor & Destructor Documentation

## Optional() [1/5]

template<typename T>

Catch::Optional< T >::Optional | ( |  | ) |

inline

Here is the caller graph for this function:

## ~Optional()

template<typename T>

Catch::Optional< T >::~Optional | ( |  | ) |

inline

Here is the call graph for this function:

## Optional() [2/5]

template<typename T>

Catch::Optional< T >::Optional | ( | T const & | _value | ) |

inline

## Optional() [3/5]

template<typename T>

Catch::Optional< T >::Optional | ( | T && | _value | ) |

inline

## Optional() [4/5]

template<typename T>

Catch::Optional< T >::Optional | ( | Optional< T > const & | _other | ) |

inline

Here is the call graph for this function:

## Optional() [5/5]

template<typename T>

Catch::Optional< T >::Optional | ( | Optional< T > && | _other | ) |

inline

Here is the call graph for this function:

## Member Function Documentation

## none()

template<typename T>

bool Catch::Optional< T >::none | ( |  | ) | const

inline

Here is the caller graph for this function:

## operator bool()

template<typename T>

Catch::Optional< T >::operator bool | ( |  | ) | const

inlineexplicit

Here is the call graph for this function:

## operator!()

template<typename T>

bool Catch::Optional< T >::operator! | ( |  | ) | const

inline

## operator*() [1/2]

template<typename T>

T & Catch::Optional< T >::operator* | ( |  | ) |

inline

## operator*() [2/2]

template<typename T>

T const & Catch::Optional< T >::operator* | ( |  | ) | const

inline

## operator->() [1/2]

template<typename T>

T * Catch::Optional< T >::operator-> | ( |  | ) |

inline

## operator->() [2/2]

template<typename T>

const T * Catch::Optional< T >::operator-> | ( |  | ) | const

inline

## operator=() [1/4]

template<typename T>

Optional & Catch::Optional< T >::operator= | ( | Optional< T > && | _other | ) |

inline

Here is the call graph for this function:

## operator=() [2/4]

template<typename T>

Optional & Catch::Optional< T >::operator= | ( | Optional< T > const & | _other | ) |

inline

Here is the call graph for this function:

## operator=() [3/4]

template<typename T>

Optional & Catch::Optional< T >::operator= | ( | T && | _value | ) |

inline

Here is the call graph for this function:

## operator=() [4/4]

template<typename T>

Optional & Catch::Optional< T >::operator= | ( | T const & | _value | ) |

inline

Here is the call graph for this function:

## reset()

template<typename T>

void Catch::Optional< T >::reset | ( |  | ) |

inline

Here is the caller graph for this function:

## some()

template<typename T>

bool Catch::Optional< T >::some | ( |  | ) | const

inline

Here is the caller graph for this function:

## valueOr()

template<typename T>

T Catch::Optional< T >::valueOr | ( | T const & | defaultValue | ) | const

inline

## Friends And Related Symbol Documentation

## operator!=

template<typename T>

bool operator!= | ( | Optional< T > const & | a,
|  | Optional< T > const & | b )

friend

## operator==

template<typename T>

bool operator== | ( | Optional< T > const & | a,
|  | Optional< T > const & | b )

friend

## Member Data Documentation

## nullableValue

template<typename T>

T* Catch::Optional< T >::nullableValue

private

## storage

template<typename T>

char Catch::Optional< T >::storage[sizeof(T)]

private

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

- tests/vendor/catch_amalgamated.hpp