The function object's result type
Model of

Adaptable Binary Function

Type requirements

Arg1 is Assignable.

Arg2 is Assignable.

Result is Assignable.

Public base classes

binary_function<Arg1, Arg2, Result>

Members
Member Where defined Description
first_argument_type Adaptable Binary Function The type of the first argument: Arg1.
second_argument_type Adaptable Binary Function The type of the second argument: Arg2
result_type Adaptable Binary Function The type of the result: Result
Result operator()(Arg1 x, Arg2 y) Binary Function Function call operator.
pointer_to_binary_function(Result (*f)(Arg1, Arg2)) pointer_to_binary_function See below.
pointer_to_binary_function() pointer_to_binary_function See below.
template <class Arg1, class Arg2, class Result> pointer_to_unary_function<Arg1, Arg2, Result> ptr_fun(Result (*x)(Arg1, Arg2)); pointer_to_binary_function See below.
New members

These members are not defined in the Adaptable Binary Function requirements, but are specific to pointer_to_binary_function.

Member Description
pointer_to_binary_function(Result (*f)(Arg1, Arg2)) The constructor. Creates a pointer_to_binary_function whose underlying function is f.
pointer_to_binary_function() The default constructor. This creates a pointer_to_binary_function that does not have an underlying function, and that therefore cannot actually be called.
template <class Arg1, class Arg2, class Result> pointer_to_unary_function<Arg1, Arg2, Result> ptr_fun(Result (*x)(Arg1, Arg2)); If f is of type Result (*)(Arg1, Arg2) then ptr_fun(f) is equivalent to pointer_to_binary_function<Arg1,Arg2,Result>(f), but more convenient. This is a global function, not a member function.
See also

pointer_to_unary_function, ptr_fun, Adaptable Binary Function

unary_negate<AdaptablePredicate>

Categories: functors, adaptors

Component type: type

Description

Unary_negate is a function object adaptor: it is an Adaptable Predicate that represents the logical negation of some other Adaptable Predicate. That is: if f is an object of class unary_negate<AdaptablePredicate>, then there exists an object pred of class AdaptablePredicate such that f(x) always returns the same value as !pred(x). [1] There is rarely any reason to construct a unary_negate directly; it is almost always easier to use the helper function

Добавить отзыв
ВСЕ ОТЗЫВЫ О КНИГЕ В ИЗБРАННОЕ

0

Вы можете отметить интересные вам фрагменты текста, которые будут доступны по уникальной ссылке в адресной строке браузера.

Отметить Добавить цитату