添加less

This commit is contained in:
邹晓航
2014-10-12 14:49:20 +08:00
parent 3bc466de15
commit ab840b2a33
3 changed files with 27 additions and 2 deletions

17
TinySTL/Functional.h Normal file
View File

@@ -0,0 +1,17 @@
#ifndef _FUNCTIONAL_H_
#define _FUNCTIONAL_H_
namespace TinySTL{
//********** [less] ****************
template<class T>
struct less{
typedef T first_argument_type;
typedef T second_argument_type;
typedef bool result_type;
result_type operator()(const first_argument_type& x, const second_argument_type& y){
return x < y;
}
};
}
#endif