Use boost::swap instead of std::swap_ranges to enable ADL. Fixes #2753.

[SVN r53104]
This commit is contained in:
Steven Watanabe
2009-05-19 02:37:04 +00:00
parent d2910e195a
commit 9cf5e0c9a1

View File

@ -27,6 +27,7 @@
#include <cstddef>
#include <stdexcept>
#include <boost/assert.hpp>
#include <boost/swap.hpp>
// Handles broken standard libraries better than <iterator>
#include <boost/detail/iterator.hpp>
@ -131,7 +132,8 @@ namespace boost {
// swap (note: linear complexity)
void swap (array<T,N>& y) {
std::swap_ranges(begin(),end(),y.begin());
for (size_type i = 0; i < N; ++i)
boost::swap(elems[i],y.elems[i]);
}
// direct access to data (read-only)