Negators not1 and not2 take a unary and a binary predicate, respectively, and return their complements ([expr.unary.op]).
template <class Predicate>
class unary_negate {
public:
constexpr explicit unary_negate(const Predicate& pred);
constexpr bool operator()(const typename Predicate::argument_type& x) const;
typedef typename Predicate::argument_type argument_type;
typedef bool result_type;
};
operator() returns !pred(x).
template <class Predicate>
constexpr unary_negate<Predicate> not1(const Predicate& pred);
Returns: unary_negate<Predicate>(pred).
template <class Predicate>
class binary_negate {
public:
constexpr explicit binary_negate(const Predicate& pred);
constexpr bool operator()(const typename Predicate::first_argument_type& x,
const typename Predicate::second_argument_type& y) const;
typedef typename Predicate::first_argument_type first_argument_type;
typedef typename Predicate::second_argument_type second_argument_type;
typedef bool result_type;
};
operator() returns !pred(x,y).
template <class Predicate>
constexpr binary_negate<Predicate> not2(const Predicate& pred);
Returns: binary_negate<Predicate>(pred).