Руководство по стандартной библиотеке шаблонов STL

Сравнения (Comparisons)


    Библиотека обеспечивает базовые классы функциональных объектов для всех операторов сравнения языка

template struct equal_to : binary_function { bool operator()(const T& x, const T& y) const { return x == y; } }; template struct not_equal_to : binary_function { bool operator()(const T& x, const T& y) const { return x != y; } }; template struct greater : binary_function { bool operator()(const T& x, const T& y) const { return x > y; } }; template struct less : binary_function { bool operator()(const T& x, const T& y) const { return x < y; } }; template struct greater_equal : binary_function { bool operator()(const T& x, const T& y) const { return x >= y; } }; template struct less_equal : binary_function { bool operator()(const T& x, const T& y) const { return x

Содержание раздела