[libsigcplusplus] Some perfect-forwarding.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsigcplusplus] Some perfect-forwarding.
- Date: Fri, 1 Apr 2016 08:42:03 +0000 (UTC)
commit 972936cb3ae2d3598babe9727e6893dabcf51e68
Author: Murray Cumming <murrayc murrayc com>
Date: Fri Apr 1 10:34:46 2016 +0200
Some perfect-forwarding.
sigc++/adaptors/bind.h | 4 ++--
sigc++/adaptors/track_obj.h | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/sigc++/adaptors/bind.h b/sigc++/adaptors/bind.h
index 2365526..e055a4f 100644
--- a/sigc++/adaptors/bind.h
+++ b/sigc++/adaptors/bind.h
@@ -216,9 +216,9 @@ template <typename T_element>
struct TupleVisitorVisitEach
{
template <typename T_action>
- constexpr static void visit(const T_element& element, const T_action& action)
+ constexpr static void visit(const T_element& element, T_action&& action)
{
- sigc::visit_each(action, element);
+ sigc::visit_each(std::forward<T_action>(action), element);
}
};
diff --git a/sigc++/adaptors/track_obj.h b/sigc++/adaptors/track_obj.h
index d379e45..5fad4cf 100644
--- a/sigc++/adaptors/track_obj.h
+++ b/sigc++/adaptors/track_obj.h
@@ -118,9 +118,9 @@ private:
struct TrackObjVisitForEach
{
template <typename T_action>
- static void visit(const T_element& element, const T_action& action)
+ static void visit(const T_element& element, T_action&& action)
{
- sigc::visit_each(action, element);
+ sigc::visit_each(std::forward<T_action>(action), element);
}
};
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]