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

◆ size()

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
size_type std::deque< _Tp, _Alloc >::size ( ) const
inlinenodiscardnoexcept

Returns the number of elements in the deque.

Definition at line 1330 of file stl_deque.h.

1331 {
1332 size_type __sz = this->_M_impl._M_finish - this->_M_impl._M_start;
1333 if (__sz > max_size ())
1335 return __sz;
1336 }
size_type max_size() const noexcept
Definition stl_deque.h:1341
_Deque_impl _M_impl
Definition stl_deque.h:616
size_t size_type
Definition stl_deque.h:826
A standard container using fixed-size memory allocation and constant-time manipulation of elements at...
Definition stl_deque.h:792

Referenced by _M_emplace_aux(), _M_erase(), _M_erase(), _M_insert_aux(), _M_insert_aux(), _M_new_elements_at_back(), _M_new_elements_at_front(), _M_push_back_aux(), _M_push_front_aux(), std::operator<=>(), and operator=().

Here is the caller graph for this function: