Replace boost::move with std::move

This commit is contained in:
Christian Mazakas
2023-08-28 12:59:00 -07:00
parent 11322de29f
commit adb91ac06d
13 changed files with 110 additions and 110 deletions

View File

@ -196,7 +196,7 @@ namespace boost {
{
}
compressed_base(T& x, move_tag)
: empty_value<T>(boost::empty_init_t(), boost::move(x))
: empty_value<T>(boost::empty_init_t(), std::move(x))
{
}
@ -257,8 +257,8 @@ namespace boost {
void move_assign(compressed& x)
{
first() = boost::move(x.first());
second() = boost::move(x.second());
first() = std::move(x.first());
second() = std::move(x.second());
}
void swap(compressed& x)
@ -592,7 +592,7 @@ namespace boost {
void move(optional<T>& x)
{
BOOST_ASSERT(!has_value_ && x.has_value_);
new (value_.value_ptr()) T(boost::move(x.value_.value()));
new (value_.value_ptr()) T(std::move(x.value_.value()));
boost::unordered::detail::func::destroy(x.value_.value_ptr());
has_value_ = true;
x.has_value_ = false;
@ -2036,7 +2036,7 @@ namespace boost {
table(table& x, boost::unordered::detail::move_tag m)
: functions(x, m), size_(x.size_), mlf_(x.mlf_),
max_load_(x.max_load_), buckets_(boost::move(x.buckets_))
max_load_(x.max_load_), buckets_(std::move(x.buckets_))
{
x.size_ = 0;
x.max_load_ = 0;
@ -2114,7 +2114,7 @@ namespace boost {
// allocators might have already been moved).
void move_buckets_from(table& other)
{
buckets_ = boost::move(other.buckets_);
buckets_ = std::move(other.buckets_);
size_ = other.size_;
max_load_ = other.max_load_;
@ -2140,7 +2140,7 @@ namespace boost {
this->reserve(src.size_);
for (iterator pos = src.begin(); pos != src.end(); ++pos) {
node_tmp b(detail::func::construct_node(
this->node_alloc(), boost::move(pos.p->value())),
this->node_alloc(), std::move(pos.p->value())),
this->node_alloc());
const_key_type& k = this->get_key(b.node_);
@ -2241,7 +2241,7 @@ namespace boost {
// the new ones.
delete_buckets();
buckets_.reset_allocator(x.node_alloc());
buckets_ = boost::move(new_buckets);
buckets_ = std::move(new_buckets);
// Copy over other data, all no throw.
mlf_ = x.mlf_;
@ -2707,7 +2707,7 @@ namespace boost {
if (p) {
iterator pos(p, itb);
result.node = boost::move(np);
result.node = std::move(np);
result.position = pos;
result.inserted = false;
return;
@ -2953,14 +2953,14 @@ namespace boost {
node_allocator_type alloc = this->node_alloc();
for (iterator pos = src.begin(); pos != last; ++pos) {
value_type value = boost::move(*pos);
value_type value = std::move(*pos);
const_key_type& key = extractor::extract(value);
std::size_t const key_hash = this->hash(key);
bucket_iterator itb = buckets_.at(buckets_.position(key_hash));
node_tmp tmp(
detail::func::construct_node(alloc, boost::move(value)), alloc);
detail::func::construct_node(alloc, std::move(value)), alloc);
buckets_.insert_node(itb, tmp.release());
++size_;
@ -3299,7 +3299,7 @@ namespace boost {
node_allocator_type alloc = this->node_alloc();
for (iterator pos = src.begin(); pos != last; ++pos) {
value_type value = boost::move(*pos);
value_type value = std::move(*pos);
const_key_type& key = extractor::extract(value);
std::size_t const key_hash = this->hash(key);
@ -3307,7 +3307,7 @@ namespace boost {
node_pointer hint = this->find_node_impl(key, itb);
node_tmp tmp(
detail::func::construct_node(alloc, boost::move(value)), alloc);
detail::func::construct_node(alloc, std::move(value)), alloc);
buckets_.insert_node_hint(itb, tmp.release(), hint);
++size_;
@ -3410,7 +3410,7 @@ namespace boost {
}
BOOST_CATCH_END
buckets_ = boost::move(new_buckets);
buckets_ = std::move(new_buckets);
recalculate_max_load();
}

View File

@ -94,7 +94,7 @@ template<typename Set> struct load_or_save_unordered_set<Set,false> /* load */
archive_constructed<value_type> value("item",ar,value_version);
std::pair<iterator,bool> p=adapt_insert_return_type(
x.insert(boost::move(value.get())));
x.insert(std::move(value.get())));
if(!p.second)throw_exception(bad_archive_exception());
ar.reset_object_address(
boost::addressof(*p.first),boost::addressof(value.get()));
@ -169,7 +169,7 @@ template<typename Map> struct load_or_save_unordered_map<Map,false> /* load */
archive_constructed<mapped_type> mapped("mapped",ar,mapped_version);
std::pair<iterator,bool> p=adapt_insert_return_type(
x.emplace(boost::move(key.get()),boost::move(mapped.get())));
x.emplace(std::move(key.get()),std::move(mapped.get())));
if(!p.second)throw_exception(bad_archive_exception());
ar.reset_object_address(
boost::addressof(p.first->first),boost::addressof(key.get()));

View File

@ -251,7 +251,7 @@ namespace boost {
boost::unordered::detail::empty_emplace(),
value_type v = value_type())
{
return this->emplace(boost::move(v));
return this->emplace(std::move(v));
}
#endif
@ -308,7 +308,7 @@ namespace boost {
boost::unordered::detail::empty_emplace(),
value_type v = value_type())
{
return this->emplace_hint(hint, boost::move(v));
return this->emplace_hint(hint, std::move(v));
}
#endif
@ -391,7 +391,7 @@ namespace boost {
std::pair<iterator, bool> insert(BOOST_RV_REF(value_type) x)
{
return this->emplace(boost::move(x));
return this->emplace(std::move(x));
}
template <class P2>
@ -410,7 +410,7 @@ namespace boost {
iterator insert(const_iterator hint, BOOST_RV_REF(value_type) x)
{
return this->emplace_hint(hint, boost::move(x));
return this->emplace_hint(hint, std::move(x));
}
template <class P2>
@ -454,7 +454,7 @@ namespace boost {
{
insert_return_type result;
table_.move_insert_node_type_unique((node_type&)np, result);
return boost::move(result);
return result;
}
iterator insert(const_iterator hint, BOOST_RV_REF(node_type) np)
@ -486,7 +486,7 @@ namespace boost {
BOOST_RV_REF(key_type) k, BOOST_FWD_REF(Args)... args)
{
return table_.try_emplace_unique(
boost::move(k), boost::forward<Args>(args)...);
std::move(k), boost::forward<Args>(args)...);
}
template <class Key, class... Args>
@ -512,7 +512,7 @@ namespace boost {
BOOST_FWD_REF(Args)... args)
{
return table_.try_emplace_hint_unique(
hint, boost::move(k), boost::forward<Args>(args)...);
hint, std::move(k), boost::forward<Args>(args)...);
}
template <class Key, class... Args>
@ -583,7 +583,7 @@ namespace boost {
BOOST_RV_REF(key_type) k, BOOST_FWD_REF(A0) a0)
{
return table_.try_emplace_unique(
boost::move(k), boost::unordered::detail::create_emplace_args(
std::move(k), boost::unordered::detail::create_emplace_args(
boost::forward<A0>(a0)));
}
@ -592,7 +592,7 @@ namespace boost {
BOOST_RV_REF(key_type) k, BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1)
{
return table_.try_emplace_unique(
boost::move(k), boost::unordered::detail::create_emplace_args(
std::move(k), boost::unordered::detail::create_emplace_args(
boost::forward<A0>(a0), boost::forward<A1>(a1)));
}
@ -600,7 +600,7 @@ namespace boost {
std::pair<iterator, bool> try_emplace(BOOST_RV_REF(key_type) k,
BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2)
{
return table_.try_emplace_unique(boost::move(k),
return table_.try_emplace_unique(std::move(k),
boost::unordered::detail::create_emplace_args(boost::forward<A0>(a0),
boost::forward<A1>(a1), boost::forward<A2>(a2)));
}
@ -677,7 +677,7 @@ namespace boost {
iterator try_emplace(
const_iterator hint, BOOST_RV_REF(key_type) k, BOOST_FWD_REF(A0) a0)
{
return table_.try_emplace_hint_unique(hint, boost::move(k),
return table_.try_emplace_hint_unique(hint, std::move(k),
boost::unordered::detail::create_emplace_args(
boost::forward<A0>(a0)));
}
@ -686,7 +686,7 @@ namespace boost {
iterator try_emplace(const_iterator hint, BOOST_RV_REF(key_type) k,
BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1)
{
return table_.try_emplace_hint_unique(hint, boost::move(k),
return table_.try_emplace_hint_unique(hint, std::move(k),
boost::unordered::detail::create_emplace_args(
boost::forward<A0>(a0), boost::forward<A1>(a1)));
}
@ -695,7 +695,7 @@ namespace boost {
iterator try_emplace(const_iterator hint, BOOST_RV_REF(key_type) k,
BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2)
{
return table_.try_emplace_hint_unique(hint, boost::move(k),
return table_.try_emplace_hint_unique(hint, std::move(k),
boost::unordered::detail::create_emplace_args(boost::forward<A0>(a0),
boost::forward<A1>(a1), boost::forward<A2>(a2)));
}
@ -753,7 +753,7 @@ namespace boost {
std::pair<iterator, bool> try_emplace(BOOST_RV_REF(key_type) k, \
BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a)) \
{ \
return table_.try_emplace_unique(boost::move(k), \
return table_.try_emplace_unique(std::move(k), \
boost::unordered::detail::create_emplace_args( \
BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, a))); \
} \
@ -771,7 +771,7 @@ namespace boost {
iterator try_emplace(const_iterator hint, BOOST_RV_REF(key_type) k, \
BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a)) \
{ \
return table_.try_emplace_hint_unique(hint, boost::move(k), \
return table_.try_emplace_hint_unique(hint, std::move(k), \
boost::unordered::detail::create_emplace_args( \
BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, a))); \
}
@ -801,7 +801,7 @@ namespace boost {
BOOST_RV_REF(key_type) k, BOOST_FWD_REF(M) obj)
{
return table_.insert_or_assign_unique(
boost::move(k), boost::forward<M>(obj));
std::move(k), boost::forward<M>(obj));
}
template <class Key, class M>
@ -825,7 +825,7 @@ namespace boost {
const_iterator, BOOST_RV_REF(key_type) k, BOOST_FWD_REF(M) obj)
{
return table_
.insert_or_assign_unique(boost::move(k), boost::forward<M>(obj))
.insert_or_assign_unique(std::move(k), boost::forward<M>(obj))
.first;
}
@ -1358,7 +1358,7 @@ namespace boost {
boost::unordered::detail::empty_emplace(),
value_type v = value_type())
{
return this->emplace(boost::move(v));
return this->emplace(std::move(v));
}
#endif
@ -1414,7 +1414,7 @@ namespace boost {
boost::unordered::detail::empty_emplace(),
value_type v = value_type())
{
return this->emplace_hint(hint, boost::move(v));
return this->emplace_hint(hint, std::move(v));
}
#endif
@ -1494,7 +1494,7 @@ namespace boost {
iterator insert(BOOST_RV_REF(value_type) x)
{
return this->emplace(boost::move(x));
return this->emplace(std::move(x));
}
template <class P2>
@ -1512,7 +1512,7 @@ namespace boost {
iterator insert(const_iterator hint, BOOST_RV_REF(value_type) x)
{
return this->emplace_hint(hint, boost::move(x));
return this->emplace_hint(hint, std::move(x));
}
template <class P2>
@ -2236,7 +2236,7 @@ namespace boost {
typename unordered_map<K, T, H, P, A>::mapped_type&
unordered_map<K, T, H, P, A>::operator[](BOOST_RV_REF(key_type) k)
{
return table_.try_emplace_unique(boost::move(k)).first->second;
return table_.try_emplace_unique(std::move(k)).first->second;
}
template <class K, class T, class H, class P, class A>
@ -2907,7 +2907,7 @@ namespace boost {
node_handle_map(BOOST_RV_REF(node_handle_map) n) noexcept
: ptr_(n.ptr_),
alloc_(boost::move(n.alloc_))
alloc_(std::move(n.alloc_))
{
n.ptr_ = node_pointer();
}
@ -2929,7 +2929,7 @@ namespace boost {
if (!alloc_.has_value() ||
boost::allocator_propagate_on_container_move_assignment<
value_allocator>::type::value) {
alloc_ = boost::move(n.alloc_);
alloc_ = std::move(n.alloc_);
}
ptr_ = n.ptr_;
n.ptr_ = node_pointer();
@ -3000,7 +3000,7 @@ namespace boost {
insert_return_type_map(BOOST_RV_REF(insert_return_type_map) x) noexcept
: position(x.position),
inserted(x.inserted),
node(boost::move(x.node))
node(std::move(x.node))
{
}
@ -3008,7 +3008,7 @@ namespace boost {
{
inserted = x.inserted;
position = x.position;
node = boost::move(x.node);
node = std::move(x.node);
return *this;
}
};

View File

@ -249,7 +249,7 @@ namespace boost {
boost::unordered::detail::empty_emplace(),
value_type v = value_type())
{
return this->emplace(boost::move(v));
return this->emplace(std::move(v));
}
#endif
@ -306,7 +306,7 @@ namespace boost {
boost::unordered::detail::empty_emplace(),
value_type v = value_type())
{
return this->emplace_hint(hint, boost::move(v));
return this->emplace_hint(hint, std::move(v));
}
#endif
@ -389,7 +389,7 @@ namespace boost {
std::pair<iterator, bool> insert(BOOST_UNORDERED_RV_REF(value_type) x)
{
return this->emplace(boost::move(x));
return this->emplace(std::move(x));
}
template <class Key>
@ -408,7 +408,7 @@ namespace boost {
iterator insert(const_iterator hint, BOOST_UNORDERED_RV_REF(value_type) x)
{
return this->emplace_hint(hint, boost::move(x));
return this->emplace_hint(hint, std::move(x));
}
template <class Key>
@ -452,7 +452,7 @@ namespace boost {
{
insert_return_type result;
table_.move_insert_node_type_unique(np, result);
return boost::move(result);
return result;
}
iterator insert(const_iterator hint, BOOST_RV_REF(node_type) np)
@ -930,7 +930,7 @@ namespace boost {
boost::unordered::detail::empty_emplace(),
value_type v = value_type())
{
return this->emplace(boost::move(v));
return this->emplace(std::move(v));
}
#endif
@ -986,7 +986,7 @@ namespace boost {
boost::unordered::detail::empty_emplace(),
value_type v = value_type())
{
return this->emplace_hint(hint, boost::move(v));
return this->emplace_hint(hint, std::move(v));
}
#endif
@ -1066,7 +1066,7 @@ namespace boost {
iterator insert(BOOST_UNORDERED_RV_REF(value_type) x)
{
return this->emplace(boost::move(x));
return this->emplace(std::move(x));
}
iterator insert(const_iterator hint, value_type const& x)
@ -1076,7 +1076,7 @@ namespace boost {
iterator insert(const_iterator hint, BOOST_UNORDERED_RV_REF(value_type) x)
{
return this->emplace_hint(hint, boost::move(x));
return this->emplace_hint(hint, std::move(x));
}
template <class InputIt> void insert(InputIt, InputIt);
@ -2264,7 +2264,7 @@ namespace boost {
node_handle_set(BOOST_RV_REF(node_handle_set) n) noexcept
: ptr_(n.ptr_),
alloc_(boost::move(n.alloc_))
alloc_(std::move(n.alloc_))
{
n.ptr_ = node_pointer();
}
@ -2286,7 +2286,7 @@ namespace boost {
if (!alloc_.has_value() ||
value_allocator_traits::propagate_on_container_move_assignment::
value) {
alloc_ = boost::move(n.alloc_);
alloc_ = std::move(n.alloc_);
}
ptr_ = n.ptr_;
n.ptr_ = node_pointer();
@ -2349,7 +2349,7 @@ namespace boost {
insert_return_type_set(BOOST_RV_REF(insert_return_type_set) x) noexcept
: position(x.position),
inserted(x.inserted),
node(boost::move(x.node))
node(std::move(x.node))
{
}
@ -2357,7 +2357,7 @@ namespace boost {
{
inserted = x.inserted;
position = x.position;
node = boost::move(x.node);
node = std::move(x.node);
return *this;
}
};

View File

@ -44,7 +44,7 @@ template <class T> struct move_assign_base : public test::exception_base
test::exceptions_enable disable_exceptions(false);
T y1 = y;
disable_exceptions.release();
x1 = boost::move(y1);
x1 = std::move(y1);
DISABLE_EXCEPTIONS;
test::check_container(x1, y_values);

View File

@ -191,10 +191,10 @@ template <class X, class T> void container_test(X& r, T const&)
node_type n1;
node_type n2(rvalue_default<node_type>());
#if !BOOST_COMP_GNUC || BOOST_COMP_GNUC >= BOOST_VERSION_NUMBER(4, 8, 0)
TEST_NOEXCEPT_EXPR(node_type(boost::move(n1)));
TEST_NOEXCEPT_EXPR(node_type(std::move(n1)));
#endif
node_type n3;
n3 = boost::move(n2);
n3 = std::move(n2);
n1.swap(n3);
swap(n1, n3);
// TODO: noexcept for swap?
@ -350,7 +350,7 @@ template <class X, class Key> void unordered_set_test(X& r, Key const&)
test::minimal::constructor_param v;
Key k_lvalue(v);
r.emplace(boost::move(k_lvalue));
r.emplace(std::move(k_lvalue));
node_type n1 = r.extract(r.begin());
test::check_return_type<value_type>::equals_ref(n1.value());
#endif
@ -493,11 +493,11 @@ void unordered_map_test(X& r, Key const& k, T const& v)
test::check_return_type<key_type>::equals_ref(n1.key());
test::check_return_type<T>::equals_ref(n1.mapped());
node_type n2 = boost::move(n1);
r.insert(boost::move(n2));
node_type n2 = std::move(n1);
r.insert(std::move(n2));
r.insert(r.extract(r.begin()));
n2 = r.extract(r.begin());
r.insert(r.begin(), boost::move(n2));
r.insert(r.begin(), std::move(n2));
r.insert(r.end(), r.extract(r.begin()));
node_type n = r.extract(r.begin());
@ -530,11 +530,11 @@ template <class X, class T> void unordered_unique_test(X& r, T const& t)
// TODO;
// boost::function_requires<
// boost::MoveConstructibleConcept<insert_return_type>
// std::moveConstructibleConcept<insert_return_type>
// >();
// TODO;
// boost::function_requires<
// boost::MoveAssignableConcept<insert_return_type>
// std::moveAssignableConcept<insert_return_type>
// >();
boost::function_requires<
boost::DefaultConstructibleConcept<insert_return_type> >();
@ -881,9 +881,9 @@ void unordered_movable_test(X& x, Key& k, T& /* t */, Hash& hf, Pred& eq)
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
X x1(rvalue_default<X>());
X x2(boost::move(x1));
X x2(std::move(x1));
x1 = rvalue_default<X>();
x2 = boost::move(x1);
x2 = std::move(x1);
#endif
X a;
@ -922,19 +922,19 @@ void unordered_movable_test(X& x, Key& k, T& /* t */, Hash& hf, Pred& eq)
test::check_return_type<iterator>::equals(a.emplace_hint(q, v));
T v1(v);
a.emplace(boost::move(v1));
a.emplace(std::move(v1));
T v2(v);
a.insert(boost::move(v2));
a.insert(std::move(v2));
T v3(v);
test::check_return_type<iterator>::equals(a.emplace_hint(q, boost::move(v3)));
test::check_return_type<iterator>::equals(a.emplace_hint(q, std::move(v3)));
T v4(v);
test::check_return_type<iterator>::equals(a.insert(q, boost::move(v4)));
test::check_return_type<iterator>::equals(a.insert(q, std::move(v4)));
a.insert(i, j);
X a10;
T v5(v);
a10.insert(boost::move(v5));
a10.insert(std::move(v5));
q = a10.cbegin();
#ifdef BOOST_UNORDERED_FOA_TESTS
test::check_return_type<iterator>::convertible(a10.erase(q));

View File

@ -75,7 +75,7 @@ namespace insert_tests {
float b = x.max_load_factor();
typename X::value_type value = *it;
std::pair<iterator, bool> r1 = x.insert(boost::move(value));
std::pair<iterator, bool> r1 = x.insert(std::move(value));
std::pair<typename ordered::iterator, bool> r2 = tracker.insert(*it);
BOOST_TEST(r1.second == r2.second);
@ -137,7 +137,7 @@ namespace insert_tests {
float b = x.max_load_factor();
typename X::value_type value = *it;
typename X::iterator r1 = x.insert(boost::move(value));
typename X::iterator r1 = x.insert(std::move(value));
typename test::ordered<X>::iterator r2 = tracker.insert(*it);
BOOST_TEST(*r1 == *r2);
@ -258,7 +258,7 @@ namespace insert_tests {
float b = x.max_load_factor();
typename X::value_type value = *it;
pos = x.insert(pos, boost::move(value));
pos = x.insert(pos, std::move(value));
tracker_iterator r2 = tracker.insert(tracker.begin(), *it);
BOOST_TEST(*pos == *r2);
tracker.compare_key(x, *it);
@ -484,7 +484,7 @@ namespace insert_tests {
float b = x.max_load_factor();
typename X::value_type value = *it;
x.emplace(boost::move(value));
x.emplace(std::move(value));
tracker.insert(*it);
tracker.compare_key(x, *it);

View File

@ -313,7 +313,7 @@ namespace move_tests {
BOOST_TEST_EQ(test::detail::tracker.count_allocations, 0u);
#endif
y = boost::move(x);
y = std::move(x);
#if defined(BOOST_UNORDERED_USE_MOVE) || \
!defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
#ifdef BOOST_UNORDERED_FOA_TESTS
@ -357,7 +357,7 @@ namespace move_tests {
x.insert(v.begin(), v.end());
test::object_count count = test::global_object_count;
y = boost::move(x);
y = std::move(x);
if (BOOST_UNORDERED_TEST_MOVING && allocator_type::is_propagate_on_move) {
BOOST_TEST(count == test::global_object_count);
}
@ -391,7 +391,7 @@ namespace move_tests {
test::object_count count1 = test::global_object_count;
T y(v1.begin(), v1.end(), 0, hf, eq, al1);
y = boost::move(x);
y = std::move(x);
test::object_count count2 = test::global_object_count;

View File

@ -119,12 +119,12 @@ static void failed_insertion_with_hint()
typename Set<int>::node_type nh = src.extract(10);
BOOST_TEST(dst.insert(dst.find(10), boost::move(nh)) == dst.find(10));
BOOST_TEST(dst.insert(dst.find(10), std::move(nh)) == dst.find(10));
BOOST_TEST(nh);
BOOST_TEST(!nh.empty());
BOOST_TEST(nh.value() == 10);
BOOST_TEST(dst.insert(dst.find(20), boost::move(nh)) == dst.find(10));
BOOST_TEST(dst.insert(dst.find(20), std::move(nh)) == dst.find(10));
BOOST_TEST(nh);
BOOST_TEST(!nh.empty());
BOOST_TEST(nh.value() == 10);
@ -144,14 +144,14 @@ static void failed_insertion_with_hint()
dst.emplace(20, 2);
typename Map<int, int>::node_type nh = src.extract(10);
BOOST_TEST(dst.insert(dst.find(10), boost::move(nh)) == dst.find(10));
BOOST_TEST(dst.insert(dst.find(10), std::move(nh)) == dst.find(10));
BOOST_TEST(nh);
BOOST_TEST(!nh.empty());
BOOST_TEST(nh.key() == 10);
BOOST_TEST(nh.mapped() == 30);
BOOST_TEST(dst[10] == 20);
BOOST_TEST(dst.insert(dst.find(20), boost::move(nh)) == dst.find(10));
BOOST_TEST(dst.insert(dst.find(20), std::move(nh)) == dst.find(10));
BOOST_TEST(nh);
BOOST_TEST(!nh.empty());
BOOST_TEST(nh.key() == 10);
@ -195,7 +195,7 @@ template <typename Container> void node_handle_tests_impl(Container& c)
BOOST_TEST(!n2.empty());
node_handle_compare(n2, value);
node_type n3 = boost::move(n2);
node_type n3 = std::move(n2);
BOOST_TEST(n3);
BOOST_TEST(!n2);
node_handle_compare(n3, value);
@ -203,16 +203,16 @@ template <typename Container> void node_handle_tests_impl(Container& c)
// Maybe by swapping and observing that the allocator is
// swapped rather than moved?
n1 = boost::move(n3);
n1 = std::move(n3);
BOOST_TEST(n1);
BOOST_TEST(!n3);
node_handle_compare(n1, value);
// Self move-assignment empties the node_handle.
n1 = boost::move(n1);
n1 = std::move(n1);
BOOST_TEST(!n1);
n3 = boost::move(n3);
n3 = std::move(n3);
BOOST_TEST(!n3);
typename Container::value_type value1 = *c.begin();

View File

@ -255,7 +255,7 @@ namespace noexcept_tests {
try {
throwing_test_exception = true;
X x2 = boost::move(x1);
X x2 = std::move(x1);
BOOST_TEST(x2.size() == 2);
BOOST_TEST(*x2.begin() == 10 || *x2.begin() == 50);
BOOST_TEST(have_is_nothrow_move);
@ -287,7 +287,7 @@ namespace noexcept_tests {
try {
throwing_test_exception = true;
x2 = boost::move(x1);
x2 = std::move(x1);
BOOST_TEST(x2.size() == 2);
BOOST_TEST(*x2.begin() == 10 || *x2.begin() == 50);
BOOST_TEST(have_is_nothrow_move_assign);
@ -316,7 +316,7 @@ namespace noexcept_tests {
try {
throwing_test_exception = true;
x1 = boost::move(x2);
x1 = std::move(x2);
BOOST_TEST(x1.size() == 100);
BOOST_TEST(have_is_nothrow_move_assign);
} catch (test_exception) {

View File

@ -322,7 +322,7 @@ namespace move_tests {
{
T x(v.begin(), v.end());
std::size_t const size = x.size();
y = boost::move(x);
y = std::move(x);
BOOST_TEST_GE(y.size(), size);
BOOST_TEST_EQ(y.size(),
static_cast<typename T::size_type>(std::distance(y.begin(), y.end())));
@ -393,7 +393,7 @@ namespace move_tests {
template <class T>
static void double_move_construct(T& y, test::random_values<T> const&)
{
T x = boost::move(y);
T x = std::move(y);
x.clear();
BOOST_TEST_EQ(y.size(),
static_cast<typename T::size_type>(std::distance(y.begin(), y.end())));
@ -405,7 +405,7 @@ namespace move_tests {
static void double_move_assign(T& y, test::random_values<T> const&)
{
T x;
x = boost::move(y);
x = std::move(y);
x.clear();
BOOST_TEST_EQ(y.size(),
static_cast<typename T::size_type>(std::distance(y.begin(), y.end())));
@ -461,7 +461,7 @@ namespace move_tests {
unsigned num_allocs = test::detail::tracker.count_allocations;
(void)num_allocs;
T x(boost::move(y));
T x(std::move(y));
#if defined(BOOST_UNORDERED_USE_MOVE) || \
!defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
@ -503,7 +503,7 @@ namespace move_tests {
test::random_values<T> v(1000, generator);
test::object_count count;
T y(v.begin(), v.end(), 0, hf, eq, al1);
T x(boost::move(y), al2);
T x(std::move(y), al2);
#ifdef BOOST_UNORDERED_FOA_TESTS
BOOST_TEST(y.empty());
@ -530,7 +530,7 @@ namespace move_tests {
(void)num_allocs;
T x(empty(ptr));
x = boost::move(y);
x = std::move(y);
#if defined(BOOST_UNORDERED_USE_MOVE) || \
!defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
@ -577,7 +577,7 @@ namespace move_tests {
(void)num_allocs;
T x(al2);
x = boost::move(y);
x = std::move(y);
bool b = boost::allocator_propagate_on_container_move_assignment<
typename T::allocator_type>::type::value;

View File

@ -1845,7 +1845,7 @@ template <class UnorderedSet> void test_set_transparent_extract(UnorderedSet*)
BOOST_TEST_EQ(nh.value(), 0);
BOOST_TEST_EQ(count, set_size - 3);
set.insert(boost::move(nh));
set.insert(std::move(nh));
nh = set.extract(1);
count = set.count(1);
@ -1853,7 +1853,7 @@ template <class UnorderedSet> void test_set_transparent_extract(UnorderedSet*)
BOOST_TEST_EQ(nh.value(), 1);
BOOST_TEST_EQ(count, 0u);
set.insert(boost::move(nh));
set.insert(std::move(nh));
nh = set.extract(1337);
BOOST_TEST(nh.empty());
@ -1897,7 +1897,7 @@ void test_set_non_transparent_extract(UnorderedSet*)
BOOST_TEST_EQ(nh.value(), 0);
BOOST_TEST_EQ(count, set_size - 3);
set.insert(boost::move(nh));
set.insert(std::move(nh));
nh = set.extract(1);
++key_count;
@ -1909,7 +1909,7 @@ void test_set_non_transparent_extract(UnorderedSet*)
BOOST_TEST_EQ(nh.value(), 1);
BOOST_TEST_EQ(count, 0u);
set.insert(boost::move(nh));
set.insert(std::move(nh));
nh = set.extract(1337);
++key_count;

View File

@ -189,13 +189,13 @@ namespace unnecessary_copy_tests {
T x;
typename T::value_type a;
reset();
x.insert(boost::move(a));
x.insert(std::move(a));
COPY_COUNT(0);
MOVE_COUNT(1);
typename T::value_type a2;
reset();
x.insert(boost::move(a));
x.insert(std::move(a));
COPY_COUNT(0);
MOVE_COUNT((x.size() == 2 ? 1 : 0));
}
@ -209,7 +209,7 @@ namespace unnecessary_copy_tests {
T x;
typename T::value_type a;
reset();
x.insert(boost::move(a));
x.insert(std::move(a));
#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
COPY_COUNT(1);
MOVE_COUNT(0);
@ -220,7 +220,7 @@ namespace unnecessary_copy_tests {
typename T::value_type a2;
reset();
x.insert(boost::move(a));
x.insert(std::move(a));
#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
COPY_COUNT((x.size() == 2 ? 1 : 0));
MOVE_COUNT(0);
@ -290,7 +290,7 @@ namespace unnecessary_copy_tests {
typename T::value_type a;
COPY_COUNT(1);
MOVE_COUNT_EXTRA(0, 1);
x.emplace(boost::move(a));
x.emplace(std::move(a));
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
COPY_COUNT(1);
MOVE_COUNT(1);
@ -311,7 +311,7 @@ namespace unnecessary_copy_tests {
typename T::value_type a;
COPY_COUNT(1);
MOVE_COUNT(0);
x.emplace(boost::move(a));
x.emplace(std::move(a));
COPY_COUNT(1);
MOVE_COUNT(1);
}
@ -328,7 +328,7 @@ namespace unnecessary_copy_tests {
typename T::value_type a;
COPY_COUNT(1);
MOVE_COUNT_EXTRA(0, 1);
x.emplace(boost::move(a));
x.emplace(std::move(a));
#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
COPY_COUNT(2);
MOVE_COUNT_EXTRA(0, 1);
@ -393,7 +393,7 @@ namespace unnecessary_copy_tests {
// No move should take place.
reset();
x.emplace(boost::move(a));
x.emplace(std::move(a));
COPY_COUNT(0);
MOVE_COUNT(0);
@ -457,7 +457,7 @@ namespace unnecessary_copy_tests {
#if BOOST_WORKAROUND(BOOST_MSVC, == 1700)
// This is a little odd, Visual C++ 11 seems to move the pair, which
// results in one copy (for the const key) and one move (for the
// non-const mapped value). Since 'emplace(boost::move(a))' (see below)
// non-const mapped value). Since 'emplace(std::move(a))' (see below)
// has the normal result, it must be some odd consequence of how
// Visual C++ 11 handles calling move for default arguments.
COPY_COUNT(3);
@ -504,7 +504,7 @@ namespace unnecessary_copy_tests {
// No move should take place.
// (since a is already in the container)
reset();
x.emplace(boost::move(a));
x.emplace(std::move(a));
COPY_COUNT(0);
MOVE_COUNT(0);