From 95d4df58b39962f771885a6615efe1a682aab356 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Sat, 8 Dec 2018 20:11:35 +0900 Subject: function_traits: more tests, fix function objects/lambdas not working with some compilers A member function reference is not the same as a member function pointer. --- lib/util.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/util.h') diff --git a/lib/util.h b/lib/util.h index 722a7e3d..0066c03d 100644 --- a/lib/util.h +++ b/lib/util.h @@ -149,8 +149,8 @@ namespace QMatrixClient { static constexpr auto is_callable = true; using return_type = ReturnT; - using arg_types = std::tuple; - static constexpr auto arg_number = std::tuple_size::value - 1; + using arg_types = std::tuple; + static constexpr auto arg_number = std::tuple_size::value; }; namespace _impl { @@ -161,8 +161,8 @@ namespace QMatrixClient }; template - struct fn_traits - : public fn_traits + struct fn_traits + : public fn_traits { }; // A generic function object that has (non-overloaded) operator() // Specialisation for a member function -- cgit v1.2.3