diff --git a/types/traits.hpp b/types/traits.hpp index 738522a6..b15af3c7 100644 --- a/types/traits.hpp +++ b/types/traits.hpp @@ -209,31 +209,51 @@ struct remove_member_const { /// if the type is invokable the alias `return_type' will be defined for the /// return type, and the alias tuple `argument_types' will be defined for the /// arguments; +namespace detail { + template + struct func_traits { }; + + + //------------------------------------------------------------------------- + template + struct func_traits { + using return_type = ResultT; + using argument_types = std::tuple; + }; + + + //------------------------------------------------------------------------- + template + struct func_traits { + using return_type = ResultT; + using argument_types = std::tuple; + }; + + + //------------------------------------------------------------------------- + template + struct func_traits { + using return_type = ResultT; + using argument_types = std::tuple; + }; +}; + + +//----------------------------------------------------------------------------- template -struct func_traits : public func_traits> { }; - - -//----------------------------------------------------------------------------- -template -struct func_traits { - using return_type = ResultT; - using argument_types = std::tuple; -}; - - -//----------------------------------------------------------------------------- -template -struct func_traits { - using return_type = ResultT; - using argument_types = std::tuple; -}; - - -//----------------------------------------------------------------------------- -template -struct func_traits { - using return_type = ResultT; - using argument_types = std::tuple; +struct func_traits : public ::detail::func_traits< + // we apply as many transforms as possible before palming it off to the + // detail class so that we don't have to write as many distinct cases. + ::util::chain_t +> { + // we may as well record the underlying type here. it might prove useful + // to someone. + using type = T; };