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