Improve the unordered tests support for some older compilers.

Better testing of elements with equivalent keys.


[SVN r7458]
This commit is contained in:
Daniel James
2007-07-17 23:17:21 +00:00
parent 6af2b965bb
commit aabf1a408b
11 changed files with 176 additions and 20 deletions

View File

@@ -624,13 +624,14 @@ namespace exception
}
return (std::numeric_limits<std::size_t>::max)();
}
friend void swap(allocator<T>& x, allocator<T>& y)
{
std::swap(x.tag_, y.tag_);
}
};
template <class T>
void swap(allocator<T>& x, allocator<T>& y)
{
std::swap(x.tag_, y.tag_);
}
// It's pretty much impossible to write a compliant swap when these
// two can throw. So they don't.