forked from boostorg/move
Add forceinline
This commit is contained in:
@@ -35,19 +35,19 @@ struct four_way_t{};
|
|||||||
struct move_op
|
struct move_op
|
||||||
{
|
{
|
||||||
template <class SourceIt, class DestinationIt>
|
template <class SourceIt, class DestinationIt>
|
||||||
void operator()(SourceIt source, DestinationIt dest)
|
BOOST_MOVE_FORCEINLINE void operator()(SourceIt source, DestinationIt dest)
|
||||||
{ *dest = ::boost::move(*source); }
|
{ *dest = ::boost::move(*source); }
|
||||||
|
|
||||||
template <class SourceIt, class DestinationIt>
|
template <class SourceIt, class DestinationIt>
|
||||||
DestinationIt operator()(forward_t, SourceIt first, SourceIt last, DestinationIt dest_begin)
|
BOOST_MOVE_FORCEINLINE DestinationIt operator()(forward_t, SourceIt first, SourceIt last, DestinationIt dest_begin)
|
||||||
{ return ::boost::move(first, last, dest_begin); }
|
{ return ::boost::move(first, last, dest_begin); }
|
||||||
|
|
||||||
template <class SourceIt, class DestinationIt>
|
template <class SourceIt, class DestinationIt>
|
||||||
DestinationIt operator()(backward_t, SourceIt first, SourceIt last, DestinationIt dest_last)
|
BOOST_MOVE_FORCEINLINE DestinationIt operator()(backward_t, SourceIt first, SourceIt last, DestinationIt dest_last)
|
||||||
{ return ::boost::move_backward(first, last, dest_last); }
|
{ return ::boost::move_backward(first, last, dest_last); }
|
||||||
|
|
||||||
template <class SourceIt, class DestinationIt1, class DestinationIt2>
|
template <class SourceIt, class DestinationIt1, class DestinationIt2>
|
||||||
void operator()(three_way_t, SourceIt srcit, DestinationIt1 dest1it, DestinationIt2 dest2it)
|
BOOST_MOVE_FORCEINLINE void operator()(three_way_t, SourceIt srcit, DestinationIt1 dest1it, DestinationIt2 dest2it)
|
||||||
{
|
{
|
||||||
*dest2it = boost::move(*dest1it);
|
*dest2it = boost::move(*dest1it);
|
||||||
*dest1it = boost::move(*srcit);
|
*dest1it = boost::move(*srcit);
|
||||||
@@ -64,7 +64,7 @@ struct move_op
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <class SourceIt, class DestinationIt1, class DestinationIt2, class DestinationIt3>
|
template <class SourceIt, class DestinationIt1, class DestinationIt2, class DestinationIt3>
|
||||||
void operator()(four_way_t, SourceIt srcit, DestinationIt1 dest1it, DestinationIt2 dest2it, DestinationIt3 dest3it)
|
BOOST_MOVE_FORCEINLINE void operator()(four_way_t, SourceIt srcit, DestinationIt1 dest1it, DestinationIt2 dest2it, DestinationIt3 dest3it)
|
||||||
{
|
{
|
||||||
*dest3it = boost::move(*dest2it);
|
*dest3it = boost::move(*dest2it);
|
||||||
*dest2it = boost::move(*dest1it);
|
*dest2it = boost::move(*dest1it);
|
||||||
@@ -75,19 +75,19 @@ struct move_op
|
|||||||
struct swap_op
|
struct swap_op
|
||||||
{
|
{
|
||||||
template <class SourceIt, class DestinationIt>
|
template <class SourceIt, class DestinationIt>
|
||||||
void operator()(SourceIt source, DestinationIt dest)
|
BOOST_MOVE_FORCEINLINE void operator()(SourceIt source, DestinationIt dest)
|
||||||
{ boost::adl_move_swap(*dest, *source); }
|
{ boost::adl_move_swap(*dest, *source); }
|
||||||
|
|
||||||
template <class SourceIt, class DestinationIt>
|
template <class SourceIt, class DestinationIt>
|
||||||
DestinationIt operator()(forward_t, SourceIt first, SourceIt last, DestinationIt dest_begin)
|
BOOST_MOVE_FORCEINLINE DestinationIt operator()(forward_t, SourceIt first, SourceIt last, DestinationIt dest_begin)
|
||||||
{ return boost::adl_move_swap_ranges(first, last, dest_begin); }
|
{ return boost::adl_move_swap_ranges(first, last, dest_begin); }
|
||||||
|
|
||||||
template <class SourceIt, class DestinationIt>
|
template <class SourceIt, class DestinationIt>
|
||||||
DestinationIt operator()(backward_t, SourceIt first, SourceIt last, DestinationIt dest_begin)
|
BOOST_MOVE_FORCEINLINE DestinationIt operator()(backward_t, SourceIt first, SourceIt last, DestinationIt dest_begin)
|
||||||
{ return boost::adl_move_swap_ranges_backward(first, last, dest_begin); }
|
{ return boost::adl_move_swap_ranges_backward(first, last, dest_begin); }
|
||||||
|
|
||||||
template <class SourceIt, class DestinationIt1, class DestinationIt2>
|
template <class SourceIt, class DestinationIt1, class DestinationIt2>
|
||||||
void operator()(three_way_t, SourceIt srcit, DestinationIt1 dest1it, DestinationIt2 dest2it)
|
BOOST_MOVE_FORCEINLINE void operator()(three_way_t, SourceIt srcit, DestinationIt1 dest1it, DestinationIt2 dest2it)
|
||||||
{
|
{
|
||||||
typename ::boost::movelib::iterator_traits<SourceIt>::value_type tmp(boost::move(*dest2it));
|
typename ::boost::movelib::iterator_traits<SourceIt>::value_type tmp(boost::move(*dest2it));
|
||||||
*dest2it = boost::move(*dest1it);
|
*dest2it = boost::move(*dest1it);
|
||||||
@@ -105,7 +105,7 @@ struct swap_op
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <class SourceIt, class DestinationIt1, class DestinationIt2, class DestinationIt3>
|
template <class SourceIt, class DestinationIt1, class DestinationIt2, class DestinationIt3>
|
||||||
void operator()(four_way_t, SourceIt srcit, DestinationIt1 dest1it, DestinationIt2 dest2it, DestinationIt3 dest3it)
|
BOOST_MOVE_FORCEINLINE void operator()(four_way_t, SourceIt srcit, DestinationIt1 dest1it, DestinationIt2 dest2it, DestinationIt3 dest3it)
|
||||||
{
|
{
|
||||||
typename ::boost::movelib::iterator_traits<SourceIt>::value_type tmp(boost::move(*dest3it));
|
typename ::boost::movelib::iterator_traits<SourceIt>::value_type tmp(boost::move(*dest3it));
|
||||||
*dest3it = boost::move(*dest2it);
|
*dest3it = boost::move(*dest2it);
|
||||||
|
Reference in New Issue
Block a user