forked from msinilo/rdestl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
functional.h
39 lines (34 loc) · 846 Bytes
/
functional.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef RDESTL_FUNCTIONAL_H
#define RDESTL_FUNCTIONAL_H
namespace rde
{
//=============================================================================
template<typename T>
struct less
{
bool operator()(const T& lhs, const T& rhs) const
{
return lhs < rhs;
}
};
//=============================================================================
template<typename T>
struct greater
{
bool operator()(const T& lhs, const T& rhs) const
{
return lhs > rhs;
}
};
//=============================================================================
template<typename T>
struct equal_to
{
bool operator()(const T& lhs, const T& rhs) const
{
return lhs == rhs;
}
};
} // namespace rde
//-----------------------------------------------------------------------------
#endif // #ifndef RDESTL_FUNCTIONAL_H