diff options
Diffstat (limited to 'src/CRSMConfig.hpp')
| -rw-r--r-- | src/CRSMConfig.hpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/CRSMConfig.hpp b/src/CRSMConfig.hpp index c0f3b06..c161b68 100644 --- a/src/CRSMConfig.hpp +++ b/src/CRSMConfig.hpp @@ -191,6 +191,13 @@ public: }; template<typename Type> +class CRSMConfigValue<Type, typename std::enable_if<std::is_enum<Type>::value>::type> : CRSMConfigValue<typename std::underlying_type<Type>::type> { + using UndType = typename std::underlying_type<Type>::type; +public: + CRSMConfigValue(Type& config) : CRSMConfigValue<UndType>::CRSMConfigValue(static_cast<UndType&>(config)) {} +}; + +template<typename Type> CRSMConfigValue<Type>* mkConfigValue(Type& Value) { return new CRSMConfigValue<Type>(Value); |
