Skip to content

Commit

Permalink
Fix deprecated boost swap header file (#157)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnwason committed Dec 19, 2023
1 parent f299981 commit 2726458
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,3 +176,11 @@
#define RR_OVIRTUAL virtual
#endif
#define RR_NULL_FN 0

#if BOOST_VERSION >= 108400
#include <utility>
#define RR_SWAP std::swap
#else
#include <boost/core/swap.hpp>
#define RR_SWAP boost::swap
#endif
6 changes: 3 additions & 3 deletions RobotRaconteurCore/include/RobotRaconteur/ThreadPool.h
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ class IOContextThreadPool_AsyncResultAdapter

result_type res;
RR_SHARED_PTR<RobotRaconteurException> exp;
boost::swap(res, _data->_result.data());
RR_SWAP(res, _data->_result.data());
exp = _data->_exp;
_data->_exp.reset();
if (exp)
Expand Down Expand Up @@ -390,8 +390,8 @@ class IOContextThreadPool_AsyncResultAdapter
return false;
}

boost::swap(ret, _data->_result.data());
boost::swap(exp, _data->_exp);
RR_SWAP(ret, _data->_result.data());
RR_SWAP(exp, _data->_exp);
return true;
}
};
Expand Down

0 comments on commit 2726458

Please sign in to comment.