forked from boostorg/unordered
Replace boost::move with std::move
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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()));
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user