[libsigcplusplus] limit_derived_target: Move T_Self aliases into methods where they are used.



commit e683f64ef0b74ef5b7ba694c10dcae44fc1f5c41
Author: Murray Cumming <murrayc murrayc com>
Date:   Wed Apr 13 22:46:05 2016 +0200

    limit_derived_target: Move T_Self aliases into methods where they are used.

 sigc++/visit_each.h |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/sigc++/visit_each.h b/sigc++/visit_each.h
index d310821..98e575b 100644
--- a/sigc++/visit_each.h
+++ b/sigc++/visit_each.h
@@ -61,11 +61,11 @@ struct with_type<true, T_type, T_limit>
 template <class T_target, class T_action>
 struct limit_derived_target
 {
-  using T_self = limit_derived_target<T_target, T_action>;
-
   template <class T_type>
   void operator()(T_type&& _A_type) const
   {
+    using T_self = limit_derived_target<T_target, T_action>;
+
     with_type<is_base_of_or_same_v<T_target, T_type>,
       T_type, T_self>::execute_(std::forward<T_type>(_A_type), *this);
   }
@@ -101,11 +101,11 @@ struct with_type_pointer<true, T_type, T_limit>
 template <class T_target, class T_action>
 struct limit_derived_target<T_target*, T_action>
 {
-  using T_self = limit_derived_target<T_target*, T_action>;
-
   template <class T_type>
   void operator()(T_type&& _A_type) const
   {
+    using T_self = limit_derived_target<T_target*, T_action>;
+
     with_type_pointer<is_base_of_or_same_v<T_target, T_type>,
       T_type, T_self>::execute_(std::forward<T_type>(_A_type), *this);
   }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]