| 2833 | |
| 2834 | template <class U> |
| 2835 | void priv_resize(const size_type new_size, const U &u, version_0) |
| 2836 | { |
| 2837 | const size_type sz = this->m_holder.m_size; |
| 2838 | if (new_size > this->capacity()){ |
| 2839 | //This will trigger an error |
| 2840 | alloc_holder_t::on_capacity_overflow(); |
| 2841 | } |
| 2842 | else if (new_size < sz){ |
| 2843 | //Destroy last elements |
| 2844 | this->priv_destroy_last_n(sz - new_size); |
| 2845 | } |
| 2846 | else{ |
| 2847 | T* const old_finish = this->priv_raw_end(); |
| 2848 | this->priv_resize_proxy(u).uninitialized_copy_n_and_update(this->m_holder.alloc(), old_finish, new_size - sz); |
| 2849 | this->m_holder.set_stored_size(new_size); |
| 2850 | } |
| 2851 | } |
| 2852 | |
| 2853 | template <class U, class AllocVersion> |
| 2854 | void priv_resize(const size_type new_size, const U &u, AllocVersion) |
nothing calls this directly
no test coverage detected