2022-12-05 21:35:31 +00:00
|
|
|
#ifndef _RSTL_FUNCTIONAL
|
|
|
|
#define _RSTL_FUNCTIONAL
|
|
|
|
|
|
|
|
namespace rstl {
|
|
|
|
|
|
|
|
template < typename P >
|
|
|
|
struct identity {
|
|
|
|
const P& operator()(const P& it) const { return it; }
|
|
|
|
};
|
|
|
|
|
|
|
|
template < typename T >
|
|
|
|
struct less {
|
2022-12-07 17:18:48 +00:00
|
|
|
bool operator()(const T& a, const T& b) const; // { return a < b; }
|
2022-12-05 21:35:31 +00:00
|
|
|
};
|
|
|
|
|
2022-12-07 17:18:48 +00:00
|
|
|
template < typename T >
|
|
|
|
bool less<T>::operator()(const T& a, const T& b) const { return a < b; }
|
|
|
|
|
2022-12-05 21:35:31 +00:00
|
|
|
} // namespace rstl
|
|
|
|
|
|
|
|
#endif // _RSTL_FUNCTIONAL
|