在线文档教程
C++
应用 | Utilities

std::pointer_to_unary_function

STD::指针[医]到[医]一元[医]功能

template< class Arg, class Result > class pointer_to_unary_function : public std::unary_function;(until C++17)(deprecated since C++11)

std::pointer_to_unary_function函数对象,充当一元函数的包装器。

成员函数

(constructor)constructs a new pointer_to_unary_function object with the supplied function (public member function)
operator()calls the stored function (public member function)

STD::指针[医]到[医]一元[医]功能:指针[医]到[医]一元[医]功能

explicit pointer_to_unary_function( Result (*f)(Arg)

构造一个pointer_to_unary_function具有存储函数的函数对象。f...

参数

f-pointer to a function to store

STD::指针[医]到[医]一元[医]功能:操作员%28%29

Result operator()( Arg x ) const;

调用存储函数。

参数

x-argument to pass to the function

返回值

被调用的函数返回的值。

另见

pointer_to_binary_function (until C++17)adaptor-compatible wrapper for a pointer to binary function (class template)
ptr_fun (until C++17)creates an adaptor-compatible function object wrapper from a pointer to function (function template)

© cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

http://en.cpPreference.com/w/cpp/实用程序/Functional/指针[医]到[医]一元[医]功能