All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Ewoms::ConditionalStorage< cond, T > Class Template Reference

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
 

Detailed Description

template<bool cond, class T>
class Ewoms::ConditionalStorage< cond, T >

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.


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