template<class Pred>
class unary_negate
: public unary_function<Pred::argument_type, bool> {
public:
explicit unary_negate(const Pred& pr);
bool operator()(const argument_type& x) const;
};
The template class stores a copy of pr
, which must be a unary function object. It defines its member function
operator()
as returning !pr(x)
.