summaryrefslogtreecommitdiff
path: root/sigc++
diff options
context:
space:
mode:
Diffstat (limited to 'sigc++')
-rw-r--r--sigc++/functors/mem_fun.h2
-rw-r--r--sigc++/functors/ptr_fun.h4
2 files changed, 4 insertions, 2 deletions
diff --git a/sigc++/functors/mem_fun.h b/sigc++/functors/mem_fun.h
index e3327fb..1b74c3d 100644
--- a/sigc++/functors/mem_fun.h
+++ b/sigc++/functors/mem_fun.h
@@ -113,7 +113,7 @@ public:
*/
decltype(auto) operator()(obj_type_with_modifier& obj, type_trait_take_t<T_arg>... a) const
{
- return std::invoke(func_ptr_, obj, a...);
+ return std::invoke(func_ptr_, obj, std::forward<type_trait_take_t<T_arg>>(a)...);
}
protected:
diff --git a/sigc++/functors/ptr_fun.h b/sigc++/functors/ptr_fun.h
index 288ac87..c1dc8b7 100644
--- a/sigc++/functors/ptr_fun.h
+++ b/sigc++/functors/ptr_fun.h
@@ -92,7 +92,9 @@ public:
* @param a Arguments to be passed on to the function.
* @return The return value of the function invocation.
*/
- T_return operator()(type_trait_take_t<T_args>... a) const { return std::invoke(func_ptr_, a...); }
+ T_return operator()(type_trait_take_t<T_args>... a) const {
+ return std::invoke(func_ptr_, std::forward<type_trait_take_t<T_args>>(a)...);
+ }
};
/** Creates a functor of type sigc::pointer_functor which wraps an existing non-member function.