char str[MAXLEN]; ... const char* wptr = find_if(str, str + MAXLEN, compose2(not2(logical_or<bool>()), bind2nd(equal_to<char>(), ' '), bind2nd(equal_to<char>(), '\n'))); assert(wptr == str + MAXLEN || !(*wptr == ' ' || *wptr == '\n'));Definition Defined in the standard header functional, and in the nonstandard backward-compatibility header function.h. Template parameters Parameter Description Default AdaptableBinaryPredicate The type of the function object that this binary_negate is the logical negation of. Model ofAdaptable Binary Predicate Type requirementsAdaptableBinaryPredicate must be a model of Adaptable Binary Predicate. Public base classes
binary_function<AdaptableBinaryPredicate::first_argument_type, AdaptableBinaryPredicate::second_argument_type, bool>Members New members These members are not defined in the Adaptable Binary Predicate requirements, but are specific to binary_negate. Member Description
binary_negate(const AdaptableBinaryPredicate& pred)The constructor. Creates a binary_negate<AdaptableBinaryPredicate> whose underlying predicate is pred.
template <class AdaptableBinaryPredicate> binary_negate<AdaptableBinaryPredicate> not2(const AdaptableBinaryPredicate& pred);If p is of type AdaptableBinaryPredicate then not2(p) is equivalent to binary_negate<AdaptableBinaryPredicate>(p), but more convenient. This is a global function, not a member function. Notes See also The function object overview, AdaptablePredicate, Predicate, unary_negate, unary_compose, binary_compose STL Main Page
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4