MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / priv_move_assign

Function priv_move_assign

extern/boost/boost/container/vector.hpp:2450–2467  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2448
2449 template<class OtherA>
2450 void priv_move_assign(BOOST_RV_REF_BEG vector<T, OtherA, Options> BOOST_RV_REF_END x
2451 , typename dtl::enable_if_c
2452 < dtl::is_version<typename real_allocator<T, OtherA>::type, 0>::value >::type * = 0)
2453 {
2454 if(!dtl::is_same<typename real_allocator<T, OtherA>::type, allocator_type>::value &&
2455 this->capacity() < x.size()){
2456 alloc_holder_t::on_capacity_overflow();
2457 }
2458 T* const this_start = this->priv_raw_begin();
2459 T* const other_start = x.priv_raw_begin();
2460 const size_type this_sz = m_holder.m_size;
2461 const size_type other_sz = static_cast<size_type>(x.m_holder.m_size);
2462 boost::container::move_assign_range_alloc_n(this->m_holder.alloc(), other_start, other_sz, this_start, this_sz);
2463 m_holder.set_stored_size(other_sz);
2464 //Not emptying the source container seems to be confusing for users as drop-in
2465 //replacement for non-static vectors, so clear it.
2466 x.clear();
2467 }
2468
2469 template<class OtherA>
2470 void priv_move_assign(BOOST_RV_REF_BEG vector<T, OtherA, Options> BOOST_RV_REF_END x

Callers

nothing calls this directly

Calls 13

on_capacity_overflowFunction · 0.85
move_allocFunction · 0.85
capacityMethod · 0.45
sizeMethod · 0.45
allocMethod · 0.45
clearMethod · 0.45
startMethod · 0.45
deallocateMethod · 0.45
steal_resourcesMethod · 0.45
assignMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected