20 lines
300 B
C++
20 lines
300 B
C++
#pragma once
|
|
|
|
template <class T>
|
|
class Ascending
|
|
{
|
|
constexpr bool operator()(const T& lhs, const T& rhs) const
|
|
{
|
|
return lhs < rhs;
|
|
}
|
|
};
|
|
|
|
template <class T>
|
|
class Descending
|
|
{
|
|
constexpr bool operator()(const T& lhs, const T& rhs) const
|
|
{
|
|
return lhs > rhs;
|
|
}
|
|
};
|