[libsigcplusplus/variadic_mem_fun2] bound_mem_functor: Remove constructor that takes pointer.



commit 8cbdec059460868bcef8596ffe6a4c22745cff6e
Author: Murray Cumming <murrayc murrayc com>
Date:   Sun Mar 6 20:05:37 2016 +0100

    bound_mem_functor: Remove constructor that takes pointer.
    
    Leaving just the constructor that takes the object by reference.
    This is not a class that application code would use directly,
    so there seems no need for the convenience.

 sigc++/functors/macros/mem_fun.h.m4 |   11 +----------
 sigc++/signal.h                     |    2 +-
 2 files changed, 2 insertions(+), 11 deletions(-)
---
diff --git a/sigc++/functors/macros/mem_fun.h.m4 b/sigc++/functors/macros/mem_fun.h.m4
index b555bf8..899c655 100644
--- a/sigc++/functors/macros/mem_fun.h.m4
+++ b/sigc++/functors/macros/mem_fun.h.m4
@@ -84,7 +84,7 @@ mem_fun(/*$2*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg...) $3)
 {
   return bound_mem_functor_base<
     T_return (T_obj::*)(T_arg...) $3,
-    T_arg...>(_A_obj, _A_func);
+    T_arg...>(*_A_obj, _A_func);
 }
 
 /** Creates a functor of type sigc::bound_[$1]mem_functor which encapsulates a method and an object instance.
@@ -235,15 +235,6 @@ public:
       limit_reference<const object_type>, limit_reference<object_type>>;
 
   /** Constructs a bound_mem_functor_base object that wraps the passed method.
-   * @param _A_obj Pointer to instance the method will operate on.
-   * @param _A_func Pointer to method will be invoked from operator()().
-   */
-  bound_mem_functor_base(obj_type_with_modifier* _A_obj, function_type _A_func)
-    : base_type(_A_func),
-      obj_(*_A_obj)
-    {}
-
-  /** Constructs a bound_mem_functor_base object that wraps the passed method.
    * @param _A_obj Reference to instance the method will operate on.
    * @param _A_func Pointer to method will be invoked from operator()().
    */
diff --git a/sigc++/signal.h b/sigc++/signal.h
index f19242f..be7787e 100644
--- a/sigc++/signal.h
+++ b/sigc++/signal.h
@@ -922,7 +922,7 @@ public:
    * @return A functor that calls emit() on this signal.
    */
   decltype(auto) make_slot() const
-    { return bound_const_mem_functor<result_type, signal_with_accumulator, 
type_trait_take_t<T_arg>...>(this, &signal_with_accumulator::emit); }
+    { return bound_const_mem_functor<result_type, signal_with_accumulator, 
type_trait_take_t<T_arg>...>(*this, &signal_with_accumulator::emit); }
 
   /** Creates an STL-style interface for the signal's list of slots.
    * This interface supports iteration, insertion and removal of slots.


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