ptr_fun(), mem_fun() docs: Remove left-overs from sigc++-2.0
authorKjell Ahlstedt <[email protected]>
Sun, 26 Dec 2021 17:27:32 +0000 (26 18:27 +0100)
committerKjell Ahlstedt <[email protected]>
Sun, 26 Dec 2021 17:27:32 +0000 (26 18:27 +0100)
Some documentation of template parameters described sigc++-2.0
rather than sigc++-3.0.

sigc++/functors/mem_fun.h
sigc++/functors/ptr_fun.h

index 07aee0b..44e80e9 100644 (file)
@@ -33,20 +33,16 @@ namespace sigc
 {
 
 /** @defgroup mem_fun mem_fun()
- * mem_fun() Creates a functor from a pointer to a method.
+ * %mem_fun() creates a functor from a pointer to a method.
  *
- * Optionally, a reference or pointer to an object can be bound to the functor.
+ * Optionally, a reference to an object can be bound to the functor.
  *
  * @note If the object type inherits from sigc::trackable, and the
- * functor returned from mem_fun() is assigned to a sigc::slot, the functor
+ * functor returned from %mem_fun() is assigned to a sigc::slot, the functor
  * will be automatically cleared when the object goes out of scope. Invoking
  * that slot will then have no effect and will not try to use the destroyed
  * instance.
  *
- * If the member function pointer is to an overloaded type, you must specify
- * the types using template arguments starting with the first argument.
- * It is not necessary to supply the return type.
- *
  * @par Example:
  * @code
  * struct foo : public sigc::trackable
@@ -59,7 +55,7 @@ namespace sigc
  * auto f = sigc::mem_fun(my_foo, &foo::bar); // Usually not what you want.
  * @endcode
  *
- * For const methods mem_fun() takes a const reference or pointer to an object.
+ * For const methods %mem_fun() takes a const reference or pointer to an object.
  *
  * @par Example:
  * @code
@@ -71,18 +67,19 @@ namespace sigc
  * sigc::slot<void(int)> sl = sigc::mem_fun(my_foo, &foo::bar);
  * @endcode
  *
- * Use mem_fun#() if there is an ambiguity as to the number of arguments.
+ * If the member function pointer is to an overloaded type, you must specify
+ * the types using template arguments.
  *
  * @par Example:
  * @code
  * struct foo : public sigc::trackable
  * {
- *   void bar(int) {}
+ *   void bar(int) {} // choose this one
  *   void bar(float) {}
  *   void bar(int, int) {}
  * };
  * foo my_foo;
- * sigc::slot<void(int)> sl = sigc::mem_fun1<int>(my_foo, &foo::bar);
+ * sigc::slot<void(int)> sl = sigc::mem_fun1<void, foo, foo, int>(my_foo, &foo::bar);
  * @endcode
  *
  * @ingroup sigcfunctors
index b188317..1c6e265 100644 (file)
@@ -26,10 +26,7 @@ namespace sigc
 {
 
 /** @defgroup ptr_fun ptr_fun()
- * ptr_fun() creates a functor from a pointer to a function.
- * If the function pointer is to an overloaded type, you must specify
- * the types using template arguments starting with the first argument.
- * It is not necessary to supply the return type.
+ * %ptr_fun() creates a functor from a pointer to a function.
  *
  * @par Example:
  * @code
@@ -37,6 +34,9 @@ namespace sigc
  * sigc::slot<void(int)> sl = sigc::ptr_fun(&foo);
  * @endcode
  *
+ * If the function pointer is to an overloaded type, you must specify
+ * the types using template arguments.
+ *
  * @par Example:
  * @code
  * void foo(int) {}  // choose this one
@@ -45,7 +45,7 @@ namespace sigc
  * sigc::slot<void(long)> sl = sigc::ptr_fun<void, int>(&foo);
  * @endcode
  *
- * ptr_fun() can also be used to convert a pointer to a static member
+ * %ptr_fun() can also be used to convert a pointer to a static member
  * function to a functor, like so:
  *
  * @par Example: