Namespaces
Variants

std:: pointer_to_unary_function

From cppreference.net
Utilities library
Function objects
Function invocation
(C++17) (C++23)
Identity function object
(C++20)
Old binders and adaptors
( until C++17* )
( until C++17* )
( until C++17* )
pointer_to_unary_function
( until C++17* )
( until C++17* )
( until C++17* ) ( until C++17* ) ( until C++17* ) ( until C++17* )
( until C++20* )
( until C++20* )
( until C++17* ) ( until C++17* )
( until C++17* ) ( until C++17* )

( until C++17* )
( until C++17* ) ( until C++17* ) ( until C++17* ) ( until C++17* )
( until C++20* )
( until C++20* )
template <

class Arg,
class Result

> class pointer_to_unary_function : public std:: unary_function < Arg, Result > ;
(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 中移除)
从函数指针创建适配器兼容的函数对象包装器
(函数模板)