summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKjell Ahlstedt <kjellahlstedt@gmail.com>2021-12-26 18:27:32 +0100
committerKjell Ahlstedt <kjellahlstedt@gmail.com>2021-12-26 18:27:32 +0100
commit46ed1289e98d562ae85fc3a60a246ea2ef5e9e9d (patch)
tree1c7f49c8ab108464c029f1a516d0636dd3b92fdd
parent7b08f329b6616835e3b6b05ebf473a75892acfda (diff)
downloadsigc++-46ed1289e98d562ae85fc3a60a246ea2ef5e9e9d.tar.gz
ptr_fun(), mem_fun() docs: Remove left-overs from sigc++-2.0
Some documentation of template parameters described sigc++-2.0 rather than sigc++-3.0.
-rw-r--r--sigc++/functors/mem_fun.h19
-rw-r--r--sigc++/functors/ptr_fun.h10
2 files changed, 13 insertions, 16 deletions
diff --git a/sigc++/functors/mem_fun.h b/sigc++/functors/mem_fun.h
index 07aee0b..44e80e9 100644
--- a/sigc++/functors/mem_fun.h
+++ b/sigc++/functors/mem_fun.h
@@ -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
diff --git a/sigc++/functors/ptr_fun.h b/sigc++/functors/ptr_fun.h
index b188317..1c6e265 100644
--- a/sigc++/functors/ptr_fun.h
+++ b/sigc++/functors/ptr_fun.h
@@ -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: