Subversion Repositories spk

Rev

Rev 1 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 cycrow 1
#ifndef EXT_UTILS_INCLUDED
2
#define EXT_UTILS_INCLUDED
3
 
4
namespace ext
5
{
6
 
7
template <class Ty1, class Ty2>
8
class pair
9
{
10
	public:
114 cycrow 11
		typedef Ty1 first_type;
12
		typedef Ty2 second_type;
13
 
14
		Ty1 first;
15
		Ty2 second;
16
 
17
		pair() 
18
			: first(Ty1()), second(Ty2()) { }
19
		pair(const Ty1& val1, const Ty2& val2) 
20
			: first(val1), second(val2) { }
21
		pair(const pair& other)
22
			: first(other.first), second(other.second) { }
1 cycrow 23
};
24
 
25
template <class Ty>
26
class less
27
{
28
	public:
29
		bool operator() (const Ty& left, const Ty& right)
30
		{
114 cycrow 31
			return first < second;
1 cycrow 32
		}
33
};
34
 
35
}; // namespace ext
36
 
37
#endif // !defined(EXT_UTILS_INCLUDED)