diff --git a/include/boost/array.hpp b/include/boost/array.hpp index f0ebd9d..b54cf06 100644 --- a/include/boost/array.hpp +++ b/include/boost/array.hpp @@ -43,12 +43,12 @@ #endif #include -#include #include #include #include #include #include +#include #include namespace boost { @@ -143,9 +143,9 @@ namespace boost { enum { static_size = N }; // swap (note: linear complexity) - BOOST_CXX14_CONSTEXPR void swap (array& y) { - for (size_type i = 0; i < N; ++i) - boost::core::invoke_swap(elems[i],y.elems[i]); + BOOST_CXX14_CONSTEXPR void swap (array& y) + { + std::swap( elems, y.elems ); } // direct access to data @@ -264,7 +264,8 @@ namespace boost { static BOOST_CONSTEXPR size_type max_size() BOOST_NOEXCEPT { return 0; } enum { static_size = 0 }; - void swap (array& /*y*/) { + BOOST_CXX14_CONSTEXPR void swap (array& /*y*/) + { } // direct access to data @@ -370,7 +371,7 @@ namespace boost { // global swap() template - inline void swap (array& x, array& y) { + BOOST_CXX14_CONSTEXPR inline void swap (array& x, array& y) { x.swap(y); }