From 03cdcf500e1f24536b90fba77cb5513072525ac9 Mon Sep 17 00:00:00 2001 From: X-Hawk Date: Wed, 11 May 2022 02:17:02 +0800 Subject: [PATCH] fixed build problem, https://github.com/xhawk18/promise-cpp/issues/21 --- include/promise-cpp/call_traits.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/promise-cpp/call_traits.hpp b/include/promise-cpp/call_traits.hpp index 6dbf96b..1dabff3 100644 --- a/include/promise-cpp/call_traits.hpp +++ b/include/promise-cpp/call_traits.hpp @@ -138,7 +138,7 @@ struct call_traits_impl { static fun_type to_std_function(T &obj, RET(T::*func)(ARG...)) { return [obj, func](ARG...arg) -> RET { - return (const_cast(obj).*func)(arg...); + return (const_cast::type &>(obj).*func)(arg...); }; }