[libsigc++2] C++11: visit_each<>: Check for the same type as well as the base.



commit 946a44db27af9ee0f4578ec13de07efa6973ea2f
Author: Murray Cumming <murrayc murrayc com>
Date:   Sat Jul 25 21:28:36 2015 +0200

    C++11: visit_each<>: Check for the same type as well as the base.
    
    As suggested by Kjell Ahlstedt here:
    https://bugzilla.gnome.org/show_bug.cgi?id=752560#c3
    
    This fixes the test cases.

 sigc++/visit_each.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/sigc++/visit_each.h b/sigc++/visit_each.h
index c898560..0ac5980 100644
--- a/sigc++/visit_each.h
+++ b/sigc++/visit_each.h
@@ -56,7 +56,7 @@ struct limit_derived_target
   template <class T_type>
   void operator()(const T_type& _A_type) const
   {
-    with_type<std::is_base_of<T_target, T_type>::value, T_type, T_self>::execute_(_A_type, *this);
+    with_type<std::is_base_of<T_target, T_type>::value || std::is_same<T_target, T_type>::value, T_type, 
T_self>::execute_(_A_type, *this);
   }
 
   limit_derived_target(const T_action& _A_action)


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