A simple class which only stores a given member attribute if a boolean condition is true. More...
#include <conditionalstorage.hh>
Public Types | |
typedef T | type |
Public Member Functions | |
ConditionalStorage (const T &t) | |
ConditionalStorage (T &&t) | |
const T & | operator* () const |
T & | operator* () |
const T * | operator-> () const |
T * | operator-> () |
Static Public Attributes | |
static const bool | value = cond |
A simple class which only stores a given member attribute if a boolean condition is true.
If the condition is false, nothing is stored and an exception is thrown when trying to access the object.