37typedef std::pair<int, char>
Pair;
42 return x.first <
y.first;
48 return s <<
'<' <<
x.first <<
';' <<
x.second <<
'>';
61 typedef std::vector<Pair, std::allocator<Pair> >
Vector;
63 const Vector::size_type array_size =
sizeof array /
sizeof *
array;
76 std::cout <<
"original std::sort std::stable_sort\n";
78 for (Vector::size_type
i = 0;
i != array_size; ++
i)
79 std::cout <<
array [
i] <<
" "
std::vector< UserClass, std::allocator< UserClass > > Vector
std::ostream & operator<<(std::ostream &s, const Pair &x)
std::pair< int, char > Pair
bool operator()(const Pair &x, const Pair &y) const