@@ -33,20 +33,16 @@ namespace sigc
33
33
{
34
34
35
35
/* * @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.
37
37
*
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.
39
39
*
40
40
* @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
42
42
* will be automatically cleared when the object goes out of scope. Invoking
43
43
* that slot will then have no effect and will not try to use the destroyed
44
44
* instance.
45
45
*
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
- *
50
46
* @par Example:
51
47
* @code
52
48
* struct foo : public sigc::trackable
@@ -59,7 +55,7 @@ namespace sigc
59
55
* auto f = sigc::mem_fun(my_foo, &foo::bar); // Usually not what you want.
60
56
* @endcode
61
57
*
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.
63
59
*
64
60
* @par Example:
65
61
* @code
@@ -71,18 +67,19 @@ namespace sigc
71
67
* sigc::slot<void(int)> sl = sigc::mem_fun(my_foo, &foo::bar);
72
68
* @endcode
73
69
*
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.
75
72
*
76
73
* @par Example:
77
74
* @code
78
75
* struct foo : public sigc::trackable
79
76
* {
80
- * void bar(int) {}
77
+ * void bar(int) {} // choose this one
81
78
* void bar(float) {}
82
79
* void bar(int, int) {}
83
80
* };
84
81
* 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);
86
83
* @endcode
87
84
*
88
85
* @ingroup sigcfunctors
0 commit comments