|
Sierra Toolkit
Version of the Day
|
00001 #ifndef RDESTL_FUNCTIONAL_H 00002 #define RDESTL_FUNCTIONAL_H 00003 00004 namespace rde 00005 { 00006 //============================================================================= 00007 template<typename T> 00008 struct less 00009 { 00010 bool operator()(const T& lhs, const T& rhs) const 00011 { 00012 return lhs < rhs; 00013 } 00014 }; 00015 00016 //============================================================================= 00017 template<typename T> 00018 struct greater 00019 { 00020 bool operator()(const T& lhs, const T& rhs) const 00021 { 00022 return lhs > rhs; 00023 } 00024 }; 00025 00026 //============================================================================= 00027 template<typename T> 00028 struct equal_to 00029 { 00030 bool operator()(const T& lhs, const T& rhs) const 00031 { 00032 return lhs == rhs; 00033 } 00034 }; 00035 00036 } 00037 00038 //----------------------------------------------------------------------------- 00039 #endif // #ifndef RDESTL_FUNCTIONAL_H