A simplified version of std::optional (c++17), with much simpler construction semantics. More...
Public Member Functions | |
optionalData (const optionalData< T > &)=default | |
Copy construct. More... | |
optionalData (optionalData< T > &&)=default | |
Move construct. More... | |
optionalData< T > & | operator= (const optionalData< T > &)=default |
Copy assignment. More... | |
optionalData< T > & | operator= (optionalData< T > &&)=default |
Move assignment. More... | |
optionalData () | |
Default construct. More... | |
optionalData (const T &val) | |
Copy construct from value. More... | |
optionalData (T &&val) | |
Move construct from value. More... | |
bool | has_value () const noexcept |
True if it has a value. More... | |
T & | value () noexcept |
Access to the value. More... | |
const T & | value () const noexcept |
Access to the value. More... | |
const T & | value_or (const T &deflt) const |
Return value or default. More... | |
operator bool () const noexcept | |
True if it has a value. More... | |
const T & | operator* () const noexcept |
Access the value. More... | |
T & | operator* () noexcept |
Access the value. More... | |
void | operator= (const T &val) |
Copy assignment from value. More... | |
void | operator= (T &&val) |
Move assignment from value. More... | |
A simplified version of std::optional (c++17), with much simpler construction semantics.
Definition at line 41 of file optionalData.H.
|
default |
Copy construct.
|
default |
Move construct.
|
inline |
Default construct.
Definition at line 86 of file optionalData.H.
|
inline |
Copy construct from value.
Definition at line 95 of file optionalData.H.
|
inline |
Move construct from value.
Definition at line 104 of file optionalData.H.
|
default |
Copy assignment.
|
default |
Move assignment.
|
inlinenoexcept |
True if it has a value.
Definition at line 116 of file optionalData.H.
|
inlinenoexcept |
Access to the value.
Definition at line 124 of file optionalData.H.
|
inlinenoexcept |
Access to the value.
Definition at line 132 of file optionalData.H.
Return value or default.
Definition at line 140 of file optionalData.H.
|
inlineexplicitnoexcept |
True if it has a value.
Definition at line 151 of file optionalData.H.
|
inlinenoexcept |
Access the value.
Definition at line 159 of file optionalData.H.
|
inlinenoexcept |
Access the value.
Definition at line 167 of file optionalData.H.
|
inline |
Copy assignment from value.
Definition at line 175 of file optionalData.H.
|
inline |
Move assignment from value.
Definition at line 184 of file optionalData.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.