From 9cf5e0c9a1ece15ed37448d9964f8b457f267e3f Mon Sep 17 00:00:00 2001 From: Steven Watanabe Date: Tue, 19 May 2009 02:37:04 +0000 Subject: [PATCH] Use boost::swap instead of std::swap_ranges to enable ADL. Fixes #2753. [SVN r53104] --- include/boost/array.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/boost/array.hpp b/include/boost/array.hpp index 52218aa..3b1c0b0 100644 --- a/include/boost/array.hpp +++ b/include/boost/array.hpp @@ -27,6 +27,7 @@ #include #include #include +#include // Handles broken standard libraries better than #include @@ -131,7 +132,8 @@ namespace boost { // swap (note: linear complexity) void swap (array& 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)