Skip to content

Commit 46ed128

Browse files
committed
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.
1 parent 7b08f32 commit 46ed128

File tree

2 files changed

+13
-16
lines changed

2 files changed

+13
-16
lines changed

sigc++/functors/mem_fun.h

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,16 @@ namespace sigc
3333
{
3434

3535
/** @defgroup mem_fun mem_fun()
36-
* mem_fun() Creates a functor from a pointer to a method.
36+
* %mem_fun() creates a functor from a pointer to a method.
3737
*
38-
* Optionally, a reference or pointer to an object can be bound to the functor.
38+
* Optionally, a reference to an object can be bound to the functor.
3939
*
4040
* @note If the object type inherits from sigc::trackable, and the
41-
* functor returned from mem_fun() is assigned to a sigc::slot, the functor
41+
* functor returned from %mem_fun() is assigned to a sigc::slot, the functor
4242
* will be automatically cleared when the object goes out of scope. Invoking
4343
* that slot will then have no effect and will not try to use the destroyed
4444
* instance.
4545
*
46-
* If the member function pointer is to an overloaded type, you must specify
47-
* the types using template arguments starting with the first argument.
48-
* It is not necessary to supply the return type.
49-
*
5046
* @par Example:
5147
* @code
5248
* struct foo : public sigc::trackable
@@ -59,7 +55,7 @@ namespace sigc
5955
* auto f = sigc::mem_fun(my_foo, &foo::bar); // Usually not what you want.
6056
* @endcode
6157
*
62-
* For const methods mem_fun() takes a const reference or pointer to an object.
58+
* For const methods %mem_fun() takes a const reference or pointer to an object.
6359
*
6460
* @par Example:
6561
* @code
@@ -71,18 +67,19 @@ namespace sigc
7167
* sigc::slot<void(int)> sl = sigc::mem_fun(my_foo, &foo::bar);
7268
* @endcode
7369
*
74-
* Use mem_fun#() if there is an ambiguity as to the number of arguments.
70+
* If the member function pointer is to an overloaded type, you must specify
71+
* the types using template arguments.
7572
*
7673
* @par Example:
7774
* @code
7875
* struct foo : public sigc::trackable
7976
* {
80-
* void bar(int) {}
77+
* void bar(int) {} // choose this one
8178
* void bar(float) {}
8279
* void bar(int, int) {}
8380
* };
8481
* foo my_foo;
85-
* sigc::slot<void(int)> sl = sigc::mem_fun1<int>(my_foo, &foo::bar);
82+
* sigc::slot<void(int)> sl = sigc::mem_fun1<void, foo, foo, int>(my_foo, &foo::bar);
8683
* @endcode
8784
*
8885
* @ingroup sigcfunctors

sigc++/functors/ptr_fun.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,17 @@ namespace sigc
2626
{
2727

2828
/** @defgroup ptr_fun ptr_fun()
29-
* ptr_fun() creates a functor from a pointer to a function.
30-
* If the function pointer is to an overloaded type, you must specify
31-
* the types using template arguments starting with the first argument.
32-
* It is not necessary to supply the return type.
29+
* %ptr_fun() creates a functor from a pointer to a function.
3330
*
3431
* @par Example:
3532
* @code
3633
* void foo(int) {}
3734
* sigc::slot<void(int)> sl = sigc::ptr_fun(&foo);
3835
* @endcode
3936
*
37+
* If the function pointer is to an overloaded type, you must specify
38+
* the types using template arguments.
39+
*
4040
* @par Example:
4141
* @code
4242
* void foo(int) {} // choose this one
@@ -45,7 +45,7 @@ namespace sigc
4545
* sigc::slot<void(long)> sl = sigc::ptr_fun<void, int>(&foo);
4646
* @endcode
4747
*
48-
* ptr_fun() can also be used to convert a pointer to a static member
48+
* %ptr_fun() can also be used to convert a pointer to a static member
4949
* function to a functor, like so:
5050
*
5151
* @par Example:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy