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

◆ emplace_front()

template<typename _Tp, typename _Alloc>
template<typename... _Args>
deque< _Tp, _Alloc >::reference deque::emplace_front ( _Args &&... __args)

Definition at line 140 of file deque.tcc.

142 {
143 if (this->_M_impl._M_start._M_cur != this->_M_impl._M_start._M_first)
144 {
146 this->_M_impl._M_start._M_cur - 1,
148 --this->_M_impl._M_start._M_cur;
149 }
150 else
152#if __cplusplus > 201402L
153 return front();
154#endif
155 }
_Elt_pointer _M_first
Definition stl_deque.h:146
_Deque_impl _M_impl
Definition stl_deque.h:616
void _M_push_front_aux(_Args &&... __args)
Helper functions for push_* and pop_*.
Definition deque.tcc:524
reference front() noexcept
Definition stl_deque.h:1511
A standard container using fixed-size memory allocation and constant-time manipulation of elements at...
Definition stl_deque.h:792
static constexpr std::__enable_if_t< __is_custom_pointer< _Ptr >::value > construct(_Tp_alloc_type &__a, _Ptr __p, _Args &&... __args) noexcept(noexcept(_Base_type::construct(__a, std::__to_address(__p), std::forward< _Args >(__args)...)))

References deque(), _M_impl, _M_push_front_aux(), __gnu_cxx::__alloc_traits< _Tp_alloc_type >::construct(), std::forward(), and front().

Referenced by emplace().

Here is the call graph for this function:
Here is the caller graph for this function: