Skip to content

Commit

Permalink
fixed build problem, #21
Browse files Browse the repository at this point in the history
  • Loading branch information
xhawk18 committed May 10, 2022
1 parent 7dcaba6 commit 03cdcf5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/promise-cpp/call_traits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ struct call_traits_impl<RET(T::*)(ARG...), false> {

static fun_type to_std_function(T &obj, RET(T::*func)(ARG...)) {
return [obj, func](ARG...arg) -> RET {
return (const_cast<T &>(obj).*func)(arg...);
return (const_cast<typename std::remove_const<T>::type &>(obj).*func)(arg...);
};
}

Expand Down

0 comments on commit 03cdcf5

Please sign in to comment.