std:: pointer_to_unary_function
From cppreference.net
<
cpp
|
utility
|
functional
C++
Utilities library
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Function objects
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Old binders and adaptors | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
template
<
class
Arg,
|
(C++11 中已弃用)
(C++17 中移除) |
|
std::pointer_to_unary_function
是一个函数对象,它充当一元函数包装器。
目录 |
成员函数
|
(constructor)
|
构造新的
pointer_to_unary_function
对象并传入指定函数
(公开成员函数) |
|
operator()
|
调用已存储的函数
(公开成员函数) |
std::pointer_to_unary_function:: pointer_to_unary_function
|
explicit
pointer_to_unary_function
(
Result
(
*
f
)
(
Arg
)
)
;
|
||
构造一个
pointer_to_unary_function
函数对象,其存储的函数为
f
。
参数
| f | - | 要存储的函数指针 |
std::pointer_to_unary_function:: operator()
|
Result operator
(
)
(
Arg x
)
const
;
|
||
调用存储的函数。
参数
| x | - | 传递给函数的参数 |
返回值
被调用函数返回的值。
参见
|
(C++11 中弃用)
(C++17 中移除)
|
用于二元函数指针的适配器兼容包装器
(类模板) |
|
(C++11 中弃用)
(C++17 中移除)
|
从函数指针创建适配器兼容的函数对象包装器
(函数模板) |