15 #include <stxxl/types>
27 template <
typename KEY,
unsigned SIZE>
33 bulk<SIZE -
sizeof(key_type)> _data;
36 my_type(key_type __key) : _key(__key) { }
45 static my_type<KEY, SIZE> min_value()
47 return my_type<KEY, SIZE>(std::numeric_limits<key_type>::min());
49 static my_type<KEY, SIZE> max_value()
51 return my_type<KEY, SIZE>(std::numeric_limits<key_type>::max());
55 template <
typename KEY,
unsigned SIZE>
56 std::ostream & operator << (std::ostream & o, const my_type<KEY, SIZE> obj)
68 template <
typename KEY,
unsigned SIZE>
69 bool operator < (const my_type<KEY, SIZE> & a,
const my_type<KEY, SIZE> & b)
71 return a._key < b._key;
74 template <
typename KEY,
unsigned SIZE>
75 bool operator == (
const my_type<KEY, SIZE> & a,
const my_type<KEY, SIZE> & b)
77 return a._key == b._key;
80 template <
typename KEY,
unsigned SIZE>
81 bool operator != (
const my_type<KEY, SIZE> & a,
const my_type<KEY, SIZE> & b)
83 return a._key != b._key;
87 struct Cmp :
public std::less<T>
89 bool operator () (
const T & a,
const T & b)
const
91 return a._key < b._key;
96 return T::min_value();
100 return T::max_value();
106 template <
typename KEY,
unsigned SIZE>
107 bool operator < (const my_type<KEY, SIZE> & a,
const my_type<KEY, SIZE> & b)
109 return a.key() < b.key();
116 unsigned operator () ()