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:
Andrey Semashev authored and Andrzej Krzemienski committed 2023-11-09 00:38:43 +01:00
1 parent 6266c39b8e
commit def2db7c45
3 files changed
+10 -9

No files matched your search

@@ -17,6 +17,7 @@
#include <boost/type_traits/is_reference.hpp>
#include <boost/type_traits/integral_constant.hpp>
#include <boost/type_traits/conditional.hpp>
#include <boost/core/invoke_swap.hpp>
namespace boost {
@@ -894,7 +895,7 @@ class optional : public optional_detail::optional_base<T>
BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible<T>::value && ::boost::is_nothrow_move_assignable<T>::value)
{
// allow for Koenig lookup
boost::swap(*this, arg);
boost::core::invoke_swap(*this, arg);
}