boostorg / move

Boost.org move module
http://boost.org/libs/move
Boost Software License 1.0
19 stars 55 forks source link

Include <algorithm> when BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE is defined #46

Closed mkurdej closed 2 years ago

mkurdej commented 2 years ago

When directly using <boost/move/algo/move.hpp> without including it through <boost/move/move.hpp> (which includes ), one stumbles upon the error like this one:

In file included from boost/boost/container/flat_set.hpp:29:
In file included from boost/boost/container/detail/flat_tree.hpp:30:
In file included from boost/boost/container/vector.hpp:60:
In file included from boost/boost/move/algo/adaptive_merge.hpp:16:
In file included from boost/boost/move/algo/detail/adaptive_sort_merge.hpp:48:
boost/boost/move/algo/move.hpp:91:10: error: no member named 'move_backward' in namespace 'std'; did you mean 'container::move_backward'?
using ::std::move_backward;
      ^~~~~~~
boost/boost/container/detail/copy_move_algo.hpp:893:4: note: 'container::move_backward' declared here
move_backward(I f, I l, F r)
^

Another solution would be to include <boost/move/algorithm.hpp>, but it's unnecessary.

igaztanaga commented 2 years ago

Many thanks for the patch!