[libsigc++2/variadic_mem_fun2] Remove limit_reference_base<> aliases, such as const_limit_reference.



commit 2879b7c37cfd2b1c5233b980b2d5bca7580195c9
Author: Murray Cumming <murrayc murrayc com>
Date:   Sat Mar 5 11:48:52 2016 +0100

    Remove limit_reference_base<> aliases, such as const_limit_reference.
    
    Because limit_reference_base<T_type> is now simple enough to just
    use directly.

 sigc++/adaptors/bound_argument.h   |    8 ++++----
 sigc++/adaptors/track_obj.h        |    2 +-
 sigc++/macros/limit_reference.h.m4 |   36 ------------------------------------
 3 files changed, 5 insertions(+), 41 deletions(-)
---
diff --git a/sigc++/adaptors/bound_argument.h b/sigc++/adaptors/bound_argument.h
index ee9b6aa..c577ead 100644
--- a/sigc++/adaptors/bound_argument.h
+++ b/sigc++/adaptors/bound_argument.h
@@ -93,7 +93,7 @@ public:
   /** Retrieve the entity to visit in visit_each().
    * @return The limited_reference to the bound argument.
    */
-  inline const limit_reference<T_wrapped>& visit() const
+  inline const limit_reference_base<T_wrapped>& visit() const
     { return visited_; }
 
   /** Retrieve the entity to pass to the bound functor or return.
@@ -105,7 +105,7 @@ public:
 private:
   /** The limited_reference to the bound argument.
    */
-  limit_reference<T_wrapped> visited_;
+  limit_reference_base<T_wrapped> visited_;
 };
 
 /** bound_argument object for a bound argument that is passed by bind() or
@@ -126,7 +126,7 @@ public:
   /** Retrieve the entity to visit in visit_each().
    * @return The const_limited_reference to the bound argument.
    */
-  inline const const_limit_reference<T_wrapped>& visit() const
+  inline const limit_reference_base<const T_wrapped>& visit() const
     { return visited_; }
 
   /** Retrieve the entity to pass to the bound functor or return.
@@ -138,7 +138,7 @@ public:
 private:
   /** The const_limited_reference to the bound argument.
    */
-  const_limit_reference<T_wrapped> visited_;
+  limit_reference_base<const T_wrapped> visited_;
 };
 
 #ifndef DOXYGEN_SHOULD_SKIP_THIS
diff --git a/sigc++/adaptors/track_obj.h b/sigc++/adaptors/track_obj.h
index 118ce4e..7c5631f 100644
--- a/sigc++/adaptors/track_obj.h
+++ b/sigc++/adaptors/track_obj.h
@@ -83,7 +83,7 @@ public:
 #ifndef DOXYGEN_SHOULD_SKIP_THIS
 //protected:
   // public, so that visit_each() can access it.
-  std::tuple<const_limit_reference<T_obj>...> obj_;
+  std::tuple<limit_reference_base<const T_obj>...> obj_;
 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
 
 }; // end class track_obj_functor
diff --git a/sigc++/macros/limit_reference.h.m4 b/sigc++/macros/limit_reference.h.m4
index e3f865a..8584e20 100644
--- a/sigc++/macros/limit_reference.h.m4
+++ b/sigc++/macros/limit_reference.h.m4
@@ -18,31 +18,6 @@ divert(-1)
 
 include(template.macros.m4)
 
-define([LIMIT_REFERENCE],[dnl
-/** A [$1]limit_reference<Foo> object stores a reference (Foo&), but makes sure that,
- * if Foo inherits from sigc::trackable, then visit_each<>() will "limit" itself to the
- * sigc::trackable reference instead of the derived reference. This avoids use of
- * a reference to the derived type when the derived destructor has run. That can be
- * a problem when using virtual inheritance.
- *
- * If Foo inherits from trackable then both the derived reference and the
- * sigc::trackable reference are stored, so we can later retrieve the sigc::trackable
- * reference without doing an implicit conversion. To retrieve the derived reference
- * (so that you invoke methods or members of it), use invoke(). To retrieve the trackable
- * reference (so that you can call visit_each() on it), you use visit().
- *
- * If Foo does not inherit from sigc::trackable then invoke() and visit() just return the
- * derived reference.
- *
- * This is used for bound (sigc::bind) slot parameters (via bound_argument), bound return values,
- * and, with mem_fun(), the reference to the handling object.
- *
- * - @e T_type The type of the reference.
- */
-template <class T_type>
-using [$1]limit_reference = limit_reference_base<[$2]T_type>;
-])
-
 divert(0)
 
 _FIREWALL([LIMIT_REFERENCE])
@@ -173,16 +148,5 @@ struct visitor<limit_reference_base<T_type> >
 };
 #endif // DOXYGEN_SHOULD_SKIP_THIS
 
-
-
-
-LIMIT_REFERENCE([],[])dnl
-
-LIMIT_REFERENCE([const_],[const ])dnl
-
-LIMIT_REFERENCE([volatile_],[volatile ])dnl
-
-LIMIT_REFERENCE([const_volatile_],[const volatile ])dnl
-
 } /* namespace sigc */
 


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