cpp/utility/functional/unary negate

is a wrapper function object returning the complement of the unary predicate it holds.

The unary predicate type must define a member type,, that is convertible to the predicate's parameter type. The unary function objects obtained from std, std, std, std, std, std, std, or from another call to std have this type defined, as are function objects derived from the deprecated std.

objects are easily constructed with helper function std.

Member functions
{{member|{{small|std::unary_negate::}}unary_negate|2= {{dcl begin}} {{dcl rev begin}} {{dcl|until=c++14| explicit unary_negate( Predicate const& pred ); }} {{dcl|since=c++14| explicit constexpr unary_negate( Predicate const& pred ); }} {{dcl rev end}} {{dcl end}}

Constructs a {{tt|std::unary_negate}} function object with the stored predicate {{c|pred}}.

Parameters
}}

{{member|{{small|std::unary_negate::}}operator|2= {{dcl begin}} {{dcl rev begin}} {{dcl|until=c++14| bool operator( argument_type const& x ) const; }} {{dcl|since=c++14| constexpr bool operator( argument_type const& x ) const; }} {{dcl rev end}} {{dcl end}}

Returns the logical complement of the result of calling {{c|pred(x)}}.

Return value
The logical complement of the result of calling. }}