libstdc++
GNU C++ library
Loading...
Searching...
No Matches

◆ _M_fill_initialize()

template<typename _Tp, typename _Alloc>
void deque::_M_fill_initialize ( const value_type & __value)
protected

Fills the deque with copies of value.

Parameters
__valueInitial value.
Returns
Nothing.
Precondition
_M_start and _M_finish have already been initialized, but none of the deque's elements have yet been constructed.

This function is called only when the user provides an explicit size (with or without an explicit exemplar value).

Definition at line 393 of file deque.tcc.

395 {
397 __try
398 {
399 for (__cur = this->_M_impl._M_start._M_node;
400 __cur < this->_M_impl._M_finish._M_node;
401 ++__cur)
404 std::__uninitialized_fill_a(this->_M_impl._M_finish._M_first,
407 }
408 __catch(...)
409 {
410 std::_Destroy(this->_M_impl._M_start, iterator(*__cur, __cur),
413 }
414 }
#define __catch(X)
constexpr void _Destroy(_ForwardIterator __first, _ForwardIterator __last)
_Elt_pointer _M_cur
Definition stl_deque.h:145
_Deque_impl _M_impl
Definition stl_deque.h:616
static size_t _S_buffer_size() noexcept
Definition stl_deque.h:831
_Tp_alloc_type & _M_get_Tp_allocator() noexcept
Definition stl_deque.h:571
_Base::_Map_pointer _Map_pointer
Definition stl_deque.h:814
_Base::iterator iterator
Definition stl_deque.h:822
A standard container using fixed-size memory allocation and constant-time manipulation of elements at...
Definition stl_deque.h:792

References deque(), __catch, __throw_exception_again, __try, std::_Destroy(), _M_get_Tp_allocator(), _M_impl, and _S_buffer_size().

Here is the call graph for this function: