Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

Лекция 11. Функциональные объекты

.pdf
Скачиваний:
14
Добавлен:
21.03.2016
Размер:
234.12 Кб
Скачать

ФО. Операции сравнения

template<class _Ty>

struct less_equal : public binary_function<_Ty, _Ty, bool>

{

bool operator()(const _Ty& _Left, const _Ty& _Right) const

{

return (_Left <= _Right);

}

};

o template<class _Ty> struct equal_to

o template<class _Ty> struct not_equal_to o template<class _Ty> struct greater

o template<class _Ty> struct less

o template<class _Ty> struct greater_equal

ФО. Логические операции

template<class _Ty>

struct logical_not : public unary_function<_Ty, bool>

{

operator()(const _Ty& _Left) const

{

return (!_Left);

}

};

o template<class _Ty> struct logical_and o template<class _Ty> struct logical_or