From 46ed1289e98d562ae85fc3a60a246ea2ef5e9e9d Mon Sep 17 00:00:00 2001 From: Kjell Ahlstedt Date: Sun, 26 Dec 2021 18:27:32 +0100 Subject: 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. --- sigc++/functors/mem_fun.h | 19 ++++++++----------- sigc++/functors/ptr_fun.h | 10 +++++----- 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 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 sl = sigc::mem_fun1(my_foo, &foo::bar); + * sigc::slot sl = sigc::mem_fun1(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 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 sl = sigc::ptr_fun(&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: -- cgit v1.2.1