diff --git a/src/fsm.h b/src/fsm.h index b657121..5cba849 100644 --- a/src/fsm.h +++ b/src/fsm.h @@ -280,28 +280,10 @@ namespace fsmlite { no_guard >::type; - /* FIXME g++-6: ‘(action != nullptr)’ is not a constant expression - template - using make_mem_fn_action = typename std::conditional< - action != nullptr, - mem_fn_action, - no_action - >::type; - */ - - /* FIXME g++-4.8.4: ‘(guard != nullptr)’ is not a constant expression - template - using make_mem_fn_guard = typename std::conditional< - guard != nullptr, - mem_fn_guard, - no_guard - >::type; - */ - template struct make_mem_fn_action_type { void operator()(Derived& self, const Event& event) { - if (action) (self.*action)(event); + if (action != nullptr) (self.*action)(event); } }; @@ -311,7 +293,7 @@ namespace fsmlite { template struct make_mem_fn_guard_type { bool operator()(const Derived& self, const Event& event) const { - return guard ? (self.*guard)(event) : true; + return guard != nullptr ? (self.*guard)(event) : true; } };