You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An empty base struct that defines types that may be inherited by derived classes that provides a binary function object.
10
+
An empty base struct that defines types that may be inherited by derived classes that provides a binary function object. Deprecated in C++11, removed in C++17.
A template class providing a constructor that converts a binary function object into a unary function object by binding the first argument of the binary function to a specified value.
10
+
A template class providing a constructor that converts a binary function object into a unary function object by binding the first argument of the binary function to a specified value. Deprecated in C++11, removed in C++17.
A template class providing a constructor that converts a binary function object into a unary function object by binding the second argument of the binary function to a specified value.
10
+
A template class providing a constructor that converts a binary function object into a unary function object by binding the second argument of the binary function to a specified value. Deprecated in C++11, removed in C++17.
An adapter class that allows a **const** member function that takes no arguments to be called as a unary function object when initialized with a reference argument.
10
+
An adapter class that allows a **const** member function that takes no arguments to be called as a unary function object when initialized with a reference argument. Deprecated in C++11, removed in C++17.
An adapter class that allows a const member function that takes no arguments to be called as a unary function object when initialized with a reference argument.
10
+
An adapter class that allows a const member function that takes no arguments to be called as a unary function object when initialized with a reference argument. Deprecated in C++11, removed in C++17.
An adapter class that allows a **const** member function that takes a single argument to be called as a binary function object when initialized with a reference argument.
10
+
An adapter class that allows a **const** member function that takes a single argument to be called as a binary function object when initialized with a reference argument. Deprecated in C++11, removed in C++17.
An adapter class that allows a **const** member function that takes a single argument to be called as a binary function object when initialized with a pointer argument.
10
+
An adapter class that allows a **const** member function that takes a single argument to be called as a binary function object when initialized with a pointer argument. Deprecated in C++11, removed in C++17.
A helper template function that creates an adaptor to convert a binary function object into a unary function object by binding the first argument of the binary function to a specified value.
133
+
A helper template function that creates an adaptor to convert a binary function object into a unary function object by binding the first argument of the binary function to a specified value. Deprecated in C++11, removed in C++17.
123
134
124
135
```cpp
125
136
template <classOperation, class Type>
@@ -213,7 +224,7 @@ The number of elements in v1 less than 10 is: 2.
213
224
214
225
## <aname="bind2nd"></a> bind2nd
215
226
216
-
A helper template function that creates an adaptor to convert a binary function object into a unary function object by binding the second argument of the binary function to a specified value.
227
+
A helper template function that creates an adaptor to convert a binary function object into a unary function object by binding the second argument of the binary function to a specified value. Deprecated in C++11, removed in C++17.
217
228
218
229
```cpp
219
230
template <classOperation, class Type>
@@ -348,7 +359,7 @@ The `bit_and` functor is restricted to integral types for the basic data types,
348
359
349
360
## <a name="bit_not"></a> bit_not
350
361
351
-
A predefined function object that performs the bitwise complement (NOT) operation (unary `operator~`) on its argument.
362
+
A predefined function object that performs the bitwise complement (NOT) operation (unary `operator~`) on its argument. Added in C++14.
352
363
353
364
```cpp
354
365
template <class Type = void>
@@ -585,7 +596,7 @@ int main()
585
596
586
597
## <aname="mem_fun"></a> mem_fun
587
598
588
-
Helper template functions used to construct function object adaptors for member functions when initialized with pointer arguments.
599
+
Helper template functions used to construct function object adaptors for member functions when initialized with pointer arguments. Deprecated in C++11, removed in C++17.
589
600
590
601
```cpp
591
602
template <classResult, class Type>
@@ -672,7 +683,7 @@ int main( )
672
683
673
684
## <aname="mem_fun_ref"></a> mem_fun_ref
674
685
675
-
Helper template functions used to construct function object adaptors for member functions when initialized by using reference arguments.
686
+
Helper template functions used to construct function object adaptors for member functions when initialized by using reference arguments. Deprecated in C++11, removed in C++17.
Intended as a generic replacement for negation function wrappers `std::not1`and `std::not2`, this function template creates a forwarding call wrapper that returns the logical negation of the result of its contained callable object. It preserves the const qualification and value category behavior of the wrapped function object. This template function is new in C++17, and replaces the deprecated `std::not1`, `std::not2`, `std::unary_negate` and `std::binary_negate`.
939
+
The `not_fn` function template takes a callable object and returns a callable object. When the returned callable object is later invoked with some arguments, it passes them to the original callable object, and logically negates the result. It preserves the const qualification and value category behavior of the wrapped callable object. `not_fn` is new in C++17, and replaces the deprecated `std::not1`, `std::not2`, `std::unary_negate` and `std::binary_negate`.
929
940
930
941
```cpp
931
942
template <classCallable>
932
-
unspecified not_fn(Callable&& func);
943
+
/*unspecified*/ not_fn(Callable&& func);
933
944
```
934
945
935
946
### Parameters
@@ -952,16 +963,16 @@ public:
952
963
call_wrapper(call_wrapper const&) = default;
953
964
954
965
template<class... Args>
955
-
auto operator()(Args&&...) & -> decltype(!declval<result_of_t<FD&(Args...)>>());
966
+
auto operator()(Args&&...) & -> decltype(!declval<invoke_result_t<FD&(Args...)>>());
956
967
957
968
template<class... Args>
958
-
auto operator()(Args&&...) const& -> decltype(!declval<result_of_t<FD const&(Args...)>>());
969
+
auto operator()(Args&&...) const& -> decltype(!declval<invoke_result_t<FD const&(Args...)>>());
959
970
960
971
template<class... Args>
961
-
auto operator()(Args&&...) && -> decltype(!declval<result_of_t<FD(Args...)>>());
972
+
auto operator()(Args&&...) && -> decltype(!declval<invoke_result_t<FD(Args...)>>());
962
973
963
974
template<class... Args>
964
-
auto operator()(Args&&...) const&& -> decltype(!declval<result_of_t<FD const(Args...)>>());
975
+
auto operator()(Args&&...) const&& -> decltype(!declval<invoke_result_t<FD const(Args...)>>());
965
976
966
977
private:
967
978
FD fd;
@@ -973,10 +984,10 @@ The explicit constructor on the callable object *func* requires type `std::decay
973
984
The wrapper exposes call operators distinguished by lvalue or rvalue reference category and const qualification as shown here,
974
985
975
986
```cpp
976
-
template<class... Args> auto operator()(Args&&... args) & -> decltype(!declval<result_of_t<FD&(Args...)>>());
977
-
template<class... Args> auto operator()(Args&&... args) const& -> decltype(!declval<result_of_t<FD const&(Args...)>>());
978
-
template<class... Args> auto operator()(Args&&... args) && -> decltype(!declval<result_of_t<FD(Args...)>>());
979
-
template<class... Args> auto operator()(Args&&... args) const&& -> decltype(!declval<result_of_t<FD const(Args...)>>());
987
+
template<class... Args> auto operator()(Args&&... args) & -> decltype(!declval<invoke_result_t<FD&(Args...)>>());
988
+
template<class... Args> auto operator()(Args&&... args) const& -> decltype(!declval<invoke_result_t<FD const&(Args...)>>());
989
+
template<class... Args> auto operator()(Args&&... args) && -> decltype(!declval<invoke_result_t<FD(Args...)>>());
990
+
template<class... Args> auto operator()(Args&&... args) const&& -> decltype(!declval<invoke_result_t<FD const(Args...)>>());
980
991
```
981
992
982
993
The first two are equivalent to `return !INVOKE(fd, std::forward<Args>(args)...)`, and the second two are equivalent to `return !INVOKE(std::move(fd), std::forward<Args>(args)...)`.
@@ -989,54 +1000,43 @@ The first two are equivalent to `return !INVOKE(fd, std::forward<Args>(args)...)
Helper template functions used to convert unary and binary function pointers, respectively, into unary and binary adaptable functions.
1039
+
Helper template functions used to convert unary and binary function pointers, respectively, into unary and binary adaptable functions. Deprecated in C++11, removed in C++17.
0 commit comments