От: | cupuyc. | ||
Дата: | 19.03.13 13:06 | ||
Оценка: |
template <class Predicate>
class binary_negate
: public binary_function<Predicate::first_argument_type,
Predicate::second_argument_type, bool> {
protected:
Predicate pred;
public:
binary_negate(const Predicate& x) : pred(x) {}
bool operator()(const first_argument_type& x,
const second_argument_type& y) const {
return !pred(x, y);
}
};