#pragma once #include #include #include //https://qiita.com/angeart/items/94734d68999eca575881 namespace stx { namespace lambda_detail { template struct member_type; template struct member_type { using member = std::true_type; using invoker_function = std::function; }; template struct member_type { using member = std::false_type; using invoker_function = std::function; }; template struct types : member_type { public: static constexpr bool has_klass = std::is_class::value; static constexpr int argc = sizeof...(t_args); using flag_member = t_member; using klass = t_klass; using return_type = t_return_type; using is_mutable = flag_mutable; using args = std::tuple; template struct arg { typedef typename std::tuple_element>::type type; }; }; template struct lambda_type_impl; template struct lambda_type_impl : lambda_detail::types {}; } template struct lambda_type : lambda_detail::lambda_type_impl { }; template struct lambda_type : lambda_detail::types::type,ret,klass,std::true_type,args...> { }; template struct lambda_type : lambda_detail::types::type, ret, klass, std::false_type, args...> { }; };