3.1-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
Public Member Functions | List of all members
Dumux::Optional< T > Class Template Reference

A wrapper that can either contain an object of T or be empty. More...

#include <dumux/common/optional.hh>

Inheritance diagram for Dumux::Optional< T >:
Inheritance graph

Description

template<class T>
class Dumux::Optional< T >

A wrapper that can either contain an object of T or be empty.

Template Parameters
TType of wrapped objects

Public Member Functions

 Optional ()
 
template<class TT , Dune::disableCopyMove< Optional, TT > = 0>
 Optional (TT &&t)
 
 Optional (Optional &&other)
 
 Optional (const Optional &other)
 
 ~Optional ()
 
template<class TT , Dune::disableCopyMove< Optional, TT > = 0>
Optionaloperator= (TT &&t)
 
Optionaloperator= (const Optional &other)
 
Optionaloperator= (Optional &&other)
 
 operator bool () const
 
const T & value () const
 
T & value ()
 
template<class... Args>
void emplace (Args &&... args)
 
void release ()
 

Constructor & Destructor Documentation

◆ Optional() [1/4]

template<class T >
Dumux::Optional< T >::Optional ( )
inline

◆ Optional() [2/4]

template<class T >
template<class TT , Dune::disableCopyMove< Optional, TT > = 0>
Dumux::Optional< T >::Optional ( TT &&  t)
inline

◆ Optional() [3/4]

template<class T >
Dumux::Optional< T >::Optional ( Optional< T > &&  other)
inline

◆ Optional() [4/4]

template<class T >
Dumux::Optional< T >::Optional ( const Optional< T > &  other)
inline

◆ ~Optional()

template<class T >
Dumux::Optional< T >::~Optional ( )
inline

Member Function Documentation

◆ emplace()

template<class T >
template<class... Args>
void Dumux::Optional< T >::emplace ( Args &&...  args)
inline

◆ operator bool()

template<class T >
Dumux::Optional< T >::operator bool ( ) const
inlineexplicit

◆ operator=() [1/3]

template<class T >
Optional & Dumux::Optional< T >::operator= ( const Optional< T > &  other)
inline

◆ operator=() [2/3]

template<class T >
Optional & Dumux::Optional< T >::operator= ( Optional< T > &&  other)
inline

◆ operator=() [3/3]

template<class T >
template<class TT , Dune::disableCopyMove< Optional, TT > = 0>
Optional & Dumux::Optional< T >::operator= ( TT &&  t)
inline

◆ release()

template<class T >
void Dumux::Optional< T >::release ( )
inline

◆ value() [1/2]

template<class T >
T & Dumux::Optional< T >::value ( )
inline

◆ value() [2/2]

template<class T >
const T & Dumux::Optional< T >::value ( ) const
inline

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