Standard C++ Library Class Reference
unary_negate and binary_negate are function object classes that provide return types for the negators,
not1 and not2.
Interface
template <class Predicate>
class unary_negate
: public unary_function<typename Predicate::argument_type, bool> {
public:
typedef typename unary_function<typename Predicate::argument_type,
bool>::argument_type argument_type;
typedef typename unary_function<typename Predicate::argument_type,
bool>::result_type result_type;
explicit unary_negate (const Predicate&);
bool operator() (const argument_type&) const;
};
template<class Predicate>
unary_negate <Predicate> not1 (const Predicate&);
template<class Predicate>
class binary_negate
: public binary_function<typename Predicate::first_argument_type,
typename Predicate::second_argument_type,
bool>
{
public:
typedef typename binary_function<typename
Predicate::first_argument_type,
typename Predicate::second_argument_type,
bool>::second_argument_type second_argument_type;
typedef typename binary_function<typename
Predicate::first_argument_type,
typename Predicate::second_argument_type,
bool>::first_argument_type first_argument_type;
typedef typename binary_function<typename
Predicate::first_argument_type,
typename Predicate::second_argument_type, bool>::result_type
result_type;
explicit binary_negate (const Predicate&);
bool operator() (const first_argument_type&,
const second_argument_type&) const;
};
template <class Predicate>
binary_negate<Predicate> not2 (const Predicate&);