template<typename T_, bool IsDynamic_, T_ StaticValue_ = T_()>
class Tomographer::Tools::StaticOrDynamic< T_, IsDynamic_, StaticValue_ >
A type which stores a value possibly known at compile-time.
This is an implementation inspired by Eigen's mechanism of compile-time known matrix/vector sizes.
This class declares a private member property which stores a dynamic value given to the constructor, except if a value was already given as template parameter in which case we take for granted that this value will always be the one we want at runtime.
- Template Parameters
-
T_ | the type of the value to store. |
IsDynamic_ | whether to store a dynamical value, or to store the static, fixed compile-time value. |
StaticValue_ | to store at compile-time. This value will be ignored if IsDynamic is false . |
Definition at line 152 of file cxxutil.h.