From Jason Turner

[depr.member.pointer.adaptors]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpyghgibwr/{from.md → to.md} +0 -148
tmp/tmpyghgibwr/{from.md → to.md} RENAMED
@@ -1,148 +0,0 @@
1
- #### Adaptors for pointers to members <a id="depr.member.pointer.adaptors">[[depr.member.pointer.adaptors]]</a>
2
-
3
- The purpose of the following is to provide the same facilities for
4
- pointer to members as those provided for pointers to functions in 
5
- [[depr.function.pointer.adaptors]].
6
-
7
- ``` cpp
8
- template <class S, class T> class mem_fun_t
9
- : public unary_function<T*, S> {
10
- public:
11
- explicit mem_fun_t(S (T::*p)());
12
- S operator()(T* p) const;
13
- };
14
- ```
15
-
16
- `mem_fun_t` calls the member function it is initialized with given a
17
- pointer argument.
18
-
19
- ``` cpp
20
- template <class S, class T, class A> class mem_fun1_t
21
- : public binary_function<T*, A, S> {
22
- public:
23
- explicit mem_fun1_t(S (T::*p)(A));
24
- S operator()(T* p, A x) const;
25
- };
26
- ```
27
-
28
- `mem_fun1_t` calls the member function it is initialized with given a
29
- pointer argument and an additional argument of the appropriate type.
30
-
31
- ``` cpp
32
- template<class S, class T> mem_fun_t<S,T>
33
- mem_fun(S (T::*f)());
34
- template<class S, class T, class A> mem_fun1_t<S,T,A>
35
- mem_fun(S (T::*f)(A));
36
- ```
37
-
38
- `mem_fun(&X::f)` returns an object through which `X::f` can be called
39
- given a pointer to an `X` followed by the argument required for `f` (if
40
- any).
41
-
42
- ``` cpp
43
- template <class S, class T> class mem_fun_ref_t
44
- : public unary_function<T, S> {
45
- public:
46
- explicit mem_fun_ref_t(S (T::*p)());
47
- S operator()(T& p) const;
48
- };
49
- ```
50
-
51
- `mem_fun_ref_t` calls the member function it is initialized with given a
52
- reference argument.
53
-
54
- ``` cpp
55
- template <class S, class T, class A> class mem_fun1_ref_t
56
- : public binary_function<T, A, S> {
57
- public:
58
- explicit mem_fun1_ref_t(S (T::*p)(A));
59
- S operator()(T& p, A x) const;
60
- };
61
- ```
62
-
63
- `mem_fun1_ref_t` calls the member function it is initialized with given
64
- a reference argument and an additional argument of the appropriate type.
65
-
66
- ``` cpp
67
- template<class S, class T> mem_fun_ref_t<S,T>
68
- mem_fun_ref(S (T::*f)());
69
- template<class S, class T, class A> mem_fun1_ref_t<S,T,A>
70
- mem_fun_ref(S (T::*f)(A));
71
- ```
72
-
73
- `mem_fun_ref(&X::f)` returns an object through which `X::f` can be
74
- called given a reference to an `X` followed by the argument required for
75
- `f` (if any).
76
-
77
- ``` cpp
78
- template <class S, class T> class const_mem_fun_t
79
- : public unary_function<const T*, S> {
80
- public:
81
- explicit const_mem_fun_t(S (T::*p)() const);
82
- S operator()(const T* p) const;
83
- };
84
- ```
85
-
86
- `const_mem_fun_t` calls the member function it is initialized with given
87
- a pointer argument.
88
-
89
- ``` cpp
90
- template <class S, class T, class A> class const_mem_fun1_t
91
- : public binary_function<const T*, A, S> {
92
- public:
93
- explicit const_mem_fun1_t(S (T::*p)(A) const);
94
- S operator()(const T* p, A x) const;
95
- };
96
- ```
97
-
98
- `const_mem_fun1_t` calls the member function it is initialized with
99
- given a pointer argument and an additional argument of the appropriate
100
- type.
101
-
102
- ``` cpp
103
- template<class S, class T> const_mem_fun_t<S,T>
104
- mem_fun(S (T::*f)() const);
105
- template<class S, class T, class A> const_mem_fun1_t<S,T,A>
106
- mem_fun(S (T::*f)(A) const);
107
- ```
108
-
109
- `mem_fun(&X::f)` returns an object through which `X::f` can be called
110
- given a pointer to an `X` followed by the argument required for `f` (if
111
- any).
112
-
113
- ``` cpp
114
- template <class S, class T> class const_mem_fun_ref_t
115
- : public unary_function<T, S> {
116
- public:
117
- explicit const_mem_fun_ref_t(S (T::*p)() const);
118
- S operator()(const T& p) const;
119
- };
120
- ```
121
-
122
- `const_mem_fun_ref_t` calls the member function it is initialized with
123
- given a reference argument.
124
-
125
- ``` cpp
126
- template <class S, class T, class A> class const_mem_fun1_ref_t
127
- : public binary_function<T, A, S> {
128
- public:
129
- explicit const_mem_fun1_ref_t(S (T::*p)(A) const);
130
- S operator()(const T& p, A x) const;
131
- };
132
- ```
133
-
134
- `const_mem_fun1_ref_t` calls the member function it is initialized with
135
- given a reference argument and an additional argument of the appropriate
136
- type.
137
-
138
- ``` cpp
139
- template<class S, class T> const_mem_fun_ref_t<S,T>
140
- mem_fun_ref(S (T::*f)() const);
141
- template<class S, class T, class A> const_mem_fun1_ref_t<S,T,A>
142
- mem_fun_ref(S (T::*f)(A) const);
143
- ```
144
-
145
- `mem_fun_ref(&X::f)` returns an object through which `X::f` can be
146
- called given a reference to an `X` followed by the argument required for
147
- `f` (if any).
148
-