28 #ifndef EWOMS_CONDITIONAL_STORAGE_HH
29 #define EWOMS_CONDITIONAL_STORAGE_HH
31 #include <opm/common/ErrorMacros.hpp>
32 #include <opm/common/Exceptions.hpp>
46 template <
bool cond,
class T>
51 static const bool value = cond;
64 const T& operator*()
const
69 const T* operator->()
const
83 static const bool value =
false;
91 const T& operator*()
const
92 { OPM_THROW(std::logic_error,
"data member deactivated"); }
94 { OPM_THROW(std::logic_error,
"data member deactivated"); }
96 const T* operator->()
const
97 { OPM_THROW(std::logic_error,
"data member deactivated"); }
99 { OPM_THROW(std::logic_error,
"data member deactivated"); }
A simple class which only stores a given member attribute if a boolean condition is true...
Definition: conditionalstorage.hh:47