12 #ifndef ZYPP_RELCOMPARE_H
13 #define ZYPP_RELCOMPARE_H
86 struct Compare :
public std::binary_function<_Tp,_Tp,int>
89 {
return _Tp::compare( lhs, rhs ); }
107 template<
class _Tp,
class _Compare>
114 return compare( lhs, rhs ) == 0;
117 return compare( lhs, rhs ) != 0;
120 return compare( lhs, rhs ) < 0;
123 return compare( lhs, rhs ) <= 0;
126 return compare( lhs, rhs ) > 0;
129 return compare( lhs, rhs ) >= 0;
158 template<
class _Tp,
class _Compare = Compare<_Tp> >
159 struct CompareBy :
public std::binary_function<_Tp,_Tp,bool>
171 template<
class _Tp,
class _Compare = Compare<_Tp> >
178 template<
class _Tp,
class _Compare = Compare<_Tp> >
185 template<
class _Tp,
class _Compare = Compare<_Tp> >
192 template<
class _Tp,
class _Compare = Compare<_Tp> >
199 template<
class _Tp,
class _Compare = Compare<_Tp> >
206 template<
class _Tp,
class _Compare = Compare<_Tp> >
213 template<
class _Tp,
class _Compare = Compare<_Tp> >
220 template<
class _Tp,
class _Compare = Compare<_Tp> >
233 #endif // ZYPP_RELCOMPARE_H
bool operator()(const _Tp &lhs, const _Tp &rhs) const
bool operator()(const _Tp &lhs, const _Tp &rhs) const
bool operator()(const _Tp &lhs, const _Tp &rhs) const
bool operator()(const _Tp &lhs, const _Tp &rhs) const
int operator()(const _Tp &lhs, const _Tp &rhs) const
bool operator()(const _Tp &lhs, const _Tp &rhs) const
bool operator()(const _Tp &lhs, const _Tp &rhs) const
bool operator()(const _Tp &lhs, const _Tp &rhs) const
bool compareByRel(Rel op, const _Tp &lhs, const _Tp &rhs, _Compare compare)
Comparison of two elements using relational operator op.
General compare functor returning -1, 0, 1.
Functor to compare two elements by Rel based on a general _Compare functor.
bool operator()(const _Tp &lhs, const _Tp &rhs) const
for_use_in_switch inSwitch() const
Enumarator provided for use in switch statement.
bool operator()(const _Tp &lhs, const _Tp &rhs) const