Merge branch 'feature/use_invoke_swap' of https://github.com/Lastique/array into feature/pr-20

This commit is contained in:
Peter Dimov
2023-09-08 09:57:29 +03:00

View File

@ -44,7 +44,7 @@
#include <iterator>
#include <stdexcept>
#include <boost/assert.hpp>
#include <boost/core/swap.hpp>
#include <boost/core/invoke_swap.hpp>
#include <boost/static_assert.hpp>
#include <boost/throw_exception.hpp>
@ -156,7 +156,7 @@ namespace boost {
// swap (note: linear complexity)
void swap (array<T,N>& y) {
for (size_type i = 0; i < N; ++i)
boost::swap(elems[i],y.elems[i]);
boost::core::invoke_swap(elems[i],y.elems[i]);
}
// direct access to data (read-only)