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

Function priv_copy_assign

extern/boost/boost/container/vector.hpp:2508–2522  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2506
2507 template<class OtherA>
2508 void priv_copy_assign(const vector<T, OtherA, Options> &x
2509 , typename dtl::enable_if_c
2510 < dtl::is_version<typename real_allocator<T, OtherA>::type, 0>::value >::type * = 0)
2511 {
2512 if(!dtl::is_same<typename real_allocator<T, OtherA>::type, allocator_type>::value &&
2513 this->capacity() < x.size()){
2514 alloc_holder_t::on_capacity_overflow();
2515 }
2516 T* const this_start = this->priv_raw_begin();
2517 T* const other_start = x.priv_raw_begin();
2518 const size_type this_sz = m_holder.m_size;
2519 const size_type other_sz = static_cast<size_type>(x.m_holder.m_size);
2520 boost::container::copy_assign_range_alloc_n(this->m_holder.alloc(), other_start, other_sz, this_start, this_sz);
2521 m_holder.set_stored_size(other_sz);
2522 }
2523
2524 template<class OtherA>
2525 typename dtl::disable_if_or

Callers

nothing calls this directly

Calls 9

on_capacity_overflowFunction · 0.85
assign_allocFunction · 0.85
capacityMethod · 0.45
sizeMethod · 0.45
allocMethod · 0.45
clearMethod · 0.45
shrink_to_fitMethod · 0.45
assignMethod · 0.45

Tested by

no test coverage detected