.\" ident @(#)unary_negate.3 .\" Standard Template Library .\" $$RW_INSERT_HEADER "slyrs.man" .TH unary_negate 3C++ "02 Apr 1998" "Rogue Wave Software" "-" .ce2 Standard C++ Library Copyright 1998, Rogue Wave Software, Inc. .SH NAME \f2unary_negate\fP \ - A function object that returns the complement of the result of its unary predicate .SH SYNOPSIS .br #include .br template .br class unary_negate : public .RE .RS 5 unary_function; .SH DESCRIPTION unary_negate is a function object class that includes a return type for the function adapter not1. not1 is a function adapter, known as a negator, that takes a unary predicate function object as its argument and returns a unary predicate function object that is the complement of the original. Note that not1 works only with function objects that are defined as subclasses of the class unary_function. .SH INTERFACE .RE .RS 0 template .br class unary_negate : public .RE .RS 2 unary_function { .RE .RS 0 public: .RE .RS 2 explicit unary_negate (const Predicate&); .br bool operator() (const typename .RE .RS 19 Predicate::argument_type&) const; .RE .RS 0 }; .br .br template .br unary_negate not1 (const Predicate&); .SH CONSTRUCTORS .br explicit .br unary_negate(const Predicate& pred); .RE .RS 3 Constructs a \f2unary_negate\fP object from predicate \f2pred\fP. .RE .SH OPERATORS .br bool .br operator()(const typename Predicate::argument_type& x) .RE .RS 10 const; .RE .RS 3 Returns the result of \f2unary_negate\fP\f2(pred)\fP. .RE .SH SEE ALSO not1, not2, unary_function, binary_negate