mirror of
https://github.com/boostorg/array.git
synced 2025-07-29 20:27:21 +02:00
Switch to boost::core::invoke_swap.
boost::swap is deprecated and will be removed. Use boost::core::invoke_swap as a replacement.
This commit is contained in:
@ -44,7 +44,7 @@
|
|||||||
#include <iterator>
|
#include <iterator>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <boost/assert.hpp>
|
#include <boost/assert.hpp>
|
||||||
#include <boost/core/swap.hpp>
|
#include <boost/core/invoke_swap.hpp>
|
||||||
#include <boost/static_assert.hpp>
|
#include <boost/static_assert.hpp>
|
||||||
|
|
||||||
#include <boost/throw_exception.hpp>
|
#include <boost/throw_exception.hpp>
|
||||||
@ -156,7 +156,7 @@ namespace boost {
|
|||||||
// swap (note: linear complexity)
|
// swap (note: linear complexity)
|
||||||
void swap (array<T,N>& y) {
|
void swap (array<T,N>& y) {
|
||||||
for (size_type i = 0; i < N; ++i)
|
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)
|
// direct access to data (read-only)
|
||||||
|
Reference in New Issue
Block a user