libstdc++
|
Classes | |
class | std::binary_negate< _Predicate > |
class | std::unary_negate< _Predicate > |
Functions | |
template<typename _Predicate > | |
_GLIBCXX14_CONSTEXPR unary_negate< _Predicate > | std::not1 (const _Predicate &__pred) |
template<typename _Predicate > | |
_GLIBCXX14_CONSTEXPR binary_negate< _Predicate > | std::not2 (const _Predicate &__pred) |
The functions not1
and not2
each take a predicate functor and return an instance of unary_negate
or binary_negate
, respectively. These classes are functors whose operator()
performs the stored predicate function and then returns the negation of the result.
For example, given a vector of integers and a trivial predicate,
The call to find_if
will locate the first index (i) of v
for which !(v[i] > 3)
is true.
The not1/unary_negate combination works on predicates taking a single argument. The not2/binary_negate combination works on predicates which take two arguments.
|
inline |
One of the negation functors.
Definition at line 1024 of file stl_function.h.
|
inline |
One of the negation functors.
Definition at line 1052 of file stl_function.h.