CBMC
optional.h File Reference
#include <nonstd/optional.hpp>
+ Include dependency graph for optional.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

template<typename T >
using optionalt = nonstd::optional< T >
 
typedef nonstd::bad_optional_access bad_optional_accesst
 

Functions

template<typename T >
T & get_value_or_abort (optionalt< T > &opt)
 Similar to optionalt::value but in case of empty optional, generates an invariant failure instead of throwing an exception. More...
 
template<typename T >
const T & get_value_or_abort (const optionalt< T > &opt)
 Similar to optionalt::value but in case of empty optional, generates an invariant failure instead of throwing an exception. More...
 

Typedef Documentation

◆ bad_optional_accesst

typedef nonstd::bad_optional_access bad_optional_accesst

Definition at line 37 of file optional.h.

◆ optionalt

template<typename T >
using optionalt = nonstd::optional<T>

Definition at line 35 of file optional.h.

Function Documentation

◆ get_value_or_abort() [1/2]

template<typename T >
const T& get_value_or_abort ( const optionalt< T > &  opt)

Similar to optionalt::value but in case of empty optional, generates an invariant failure instead of throwing an exception.

Definition at line 52 of file optional.h.

◆ get_value_or_abort() [2/2]

template<typename T >
T& get_value_or_abort ( optionalt< T > &  opt)

Similar to optionalt::value but in case of empty optional, generates an invariant failure instead of throwing an exception.

Definition at line 44 of file optional.h.