All of
The Function Object overview, Adaptable Binary Function,
negate<T>
Category: functors
Component type: type
Each element in
const int N = 1000;
vector<double> V1(N);
vector<double> V2(N);
iota(V1.begin(), V1.end(), 1);
assert(V2.size() >= V1.size());
transform(V1.begin(), V1.end(), V2.begin(), negate<int>());
Defined in the standard header functional, and in the nonstandard backward-compatibility header function.h.
Parameter | Description |
---|---|
T | The function object's argument type and result type. |
Adaptable Unary Function, Default Constructible
unary_function<T, T>
Member | Where defined | Description |
---|---|---|
argument_type | Adaptable Unary Function | The type of the second argument: |
result_type | Adaptable Unary Function | The type of the result: |
T operator()(const T& x) | Adaptable Unary Function | Function call operator. The return value is |
negate() | Default Constructible | The default constructor. |
All of
The Function Object overview, Adaptable Unary Function,
Comparisons
equal_to<T>
Category: functors
Component type: type