From 3ee27804a62e7d0c67341afbcbe2f1a90b93c9c6 Mon Sep 17 00:00:00 2001 From: Markus Mittendrein Date: Wed, 30 Sep 2015 12:01:39 +0200 Subject: Add CRSMConfigValue-specialization for enums using std::is_enum and std::underlying_type --- src/CRSMConfig.hpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/CRSMConfig.hpp b/src/CRSMConfig.hpp index c0f3b06..c161b68 100644 --- a/src/CRSMConfig.hpp +++ b/src/CRSMConfig.hpp @@ -190,6 +190,13 @@ public: } }; +template +class CRSMConfigValue::value>::type> : CRSMConfigValue::type> { + using UndType = typename std::underlying_type::type; +public: + CRSMConfigValue(Type& config) : CRSMConfigValue::CRSMConfigValue(static_cast(config)) {} +}; + template CRSMConfigValue* mkConfigValue(Type& Value) { -- cgit v1.2.3-54-g00ecf