// Primary template
template<typename Func>
-struct FuncHelper : public FuncHelper<decltype(&Func::operator())> {};
+struct FuncHelper : public FuncHelper<decltype(&Func::operator())>
+{};
-// Overload for member function with const call operator
-template<typename C, typename R, typename ...Args>
-struct FuncHelper<R(C::*)(Args...) const> : public FuncHelper<R(C::*)(Args...)> {};
-
-// Overload for member function with non-const call operator
-template<typename C, typename R, typename ...Args>
-struct FuncHelper<R(C::*)(Args...)> {
- using ClassType = C;
+// Overload for free function
+template<typename R, typename... Args>
+struct FuncHelper<R(*)(Args...)>
+{
using FunctionType = std::function<R(Args...)>;
using ReturnType = R;
using ArgsTuple = std::tuple<Args...>;
};
+// Overload for member function with non-const call operator
+template<typename C, typename R, typename... Args>
+struct FuncHelper<R(C::*)(Args...)> : public FuncHelper<R(*)(Args...)>
+{
+ using ClassType = C;
+};
+
+// Overload for member function with const call operator
+template<typename C, typename R, typename... Args>
+struct FuncHelper<R(C::*)(Args...) const> : public FuncHelper<R(C::*)(Args...)>
+{};
+
/// @endcond
-} // detail
+} // namespace detail
/**
* Provides traits for the given callable.
*/
template<typename Callable>
-using MemberFunction = detail::FuncHelper<Callable>;
+using FunctionTraits = detail::FuncHelper<Callable>;