STD::__DEBUG::VECTOR(3cxx)

πŸ’– NAME πŸ’–

okay so bestie, this is the 3cxx manual page for std::__debug::vector< _Tp, _Allocator > β€” aka Class std::vector with safety/checking/debug instrumentation. Yes, the debug-flavored vector. It's giving "normal vector but with a safety harness and a tiny clipboard". πŸ’…


✨ SYNOPSIS ✨

#include <vector>

Inherits from __gnu_debug::_Safe_container< _SafeContainer, _Alloc, _SafeBase, _IsCxx11AllocatorAware >, vector< _Tp, std::allocator< _Tp > >, and __gnu_debug::_Safe_vector< _SafeSequence, _BaseSequence >. No cap, that's the whole inheritance vibe. 🫢

πŸŽ€ Public Types πŸŽ€

  • typedef _Allocator allocator_type β€” the allocator type, slay.
  • typedef __gnu_debug::_Safe_iterator< _Base_const_iterator, vector > const_iterator β€” safe const iterator wrapper.
  • typedef _Base::const_pointer const_pointer β€” the base's const pointer type.
  • typedef _Base::const_reference const_reference β€” the base's const reference type.
  • typedef std::reverse_iterator< const_iterator > const_reverse_iterator β€” reverse iterator over const_iterator.
  • typedef _Base::difference_type difference_type β€” difference type from _Base.
  • typedef __gnu_debug::_Safe_iterator< _Base_iterator, vector > iterator β€” safe iterator wrapper.
  • typedef _Base::pointer pointer β€” the base's pointer type.
  • typedef _Base::reference reference β€” the base's reference type.
  • typedef std::reverse_iterator< iterator > reverse_iterator β€” reverse iterator over iterator.
  • typedef _Base::size_type size_type β€” size type from _Base.
  • typedef _Tp value_type β€” the element type, literally _Tp.

πŸ‘‘ Public Member Functions πŸ‘‘

  • constexpr vector (_Base_ref __x) β€” Construction from a normal-mode vector.
  • template<class _InputIterator , typename = std::_RequireInputIter<_InputIterator>> constexpr vector (_InputIterator __first, _InputIterator __last, const _Allocator &__a=_Allocator()) β€” range constructor with the allocator defaulted.
  • constexpr vector (const _Allocator &__a) noexcept β€” allocator-only constructor, noexcept.
  • vector (const vector &)=default β€” copy constructor, defaulted.
  • constexpr vector (const vector &__x, const __type_identity_t< allocator_type > &__a) β€” copy-with-allocator constructor.
  • constexpr vector (initializer_list< value_type > __l, const allocator_type &__a=allocator_type()) β€” initializer-list constructor with allocator.
  • constexpr vector (size_type __n, const __type_identity_t< _Tp > &__value, const _Allocator &__a=_Allocator()) β€” __n copies of __value, with allocator.
  • constexpr vector (size_type __n, const _Allocator &__a=_Allocator()) β€” __n default values, with allocator.
  • vector (vector &&)=default β€” move constructor, defaulted.
  • constexpr vector (vector &&__x, const __type_identity_t< allocator_type > &__a) noexcept(std::is_nothrow_constructible< _Base, _Base, const allocator_type & >::value) β€” move-with-allocator constructor, with that exact conditional noexcept.
  • constexpr const _Base & _M_base () const noexcept β€” const base getter.
  • constexpr _Base & _M_base () noexcept β€” non-const base getter.
  • template<typename _InputIterator , typename = std::_RequireInputIter<_InputIterator>> constexpr void assign (_InputIterator __first, _InputIterator __last) β€” range assign.
  • constexpr void assign (initializer_list< value_type > __l) β€” initializer-list assign.
  • constexpr void assign (size_type __n, const _Tp &__u) β€” assign __n copies of __u.
  • constexpr const_reference back () const noexcept β€” const back.
  • constexpr reference back () noexcept β€” non-const back.
  • constexpr const_iterator begin () const noexcept β€” const begin.
  • constexpr iterator begin () noexcept β€” non-const begin.
  • constexpr size_type capacity () const noexcept β€” capacity, noexcept.
  • constexpr const_iterator cbegin () const noexcept β€” const cbegin.
  • constexpr const_iterator cend () const noexcept β€” const cend.
  • constexpr void clear () noexcept β€” clear it, noexcept.
  • constexpr const_reverse_iterator crbegin () const noexcept β€” const reverse crbegin.
  • constexpr const_reverse_iterator crend () const noexcept β€” const reverse crend.
  • template<typename... _Args> constexpr iterator emplace (const_iterator __position, _Args &&... __args) β€” emplace at __position.
  • template<typename... _Args> constexpr reference emplace_back (_Args &&... __args) β€” emplace at the back.
  • constexpr const_iterator end () const noexcept β€” const end.
  • constexpr iterator end () noexcept β€” non-const end.
  • constexpr iterator erase (const_iterator __first, const_iterator __last) β€” erase the range.
  • constexpr iterator erase (const_iterator __position) β€” erase one position.
  • constexpr const_reference front () const noexcept β€” const front.
  • constexpr reference front () noexcept β€” non-const front.
  • template<class _InputIterator , typename = std::_RequireInputIter<_InputIterator>> constexpr iterator insert (const_iterator __position, _InputIterator __first, _InputIterator __last) β€” insert a range at __position.
  • template<typename _Up = _Tp> constexpr __gnu_cxx::__enable_if<!std::__are_same< _Up, bool >::__value, iterator >::__type insert (const_iterator __position, _Tp &&__x) β€” the _Up = _Tp insert overload with the !std::__are_same< _Up, bool > enable_if.
  • constexpr iterator insert (const_iterator __position, const _Tp &__x) β€” insert a const _Tp value.
  • constexpr iterator insert (const_iterator __position, initializer_list< value_type > __l) β€” insert an initializer list.
  • constexpr iterator insert (const_iterator __position, size_type __n, const _Tp &__x) β€” insert __n copies of __x.
  • vector & operator= (const vector &)=default β€” copy assignment, defaulted.
  • constexpr vector & operator= (initializer_list< value_type > __l) β€” initializer-list assignment.
  • vector & operator= (vector &&)=default β€” move assignment, defaulted.
  • constexpr const_reference operator[] (size_type __n) const noexcept β€” const subscript.
  • constexpr reference operator[] (size_type __n) noexcept β€” non-const subscript.
  • constexpr void pop_back () noexcept β€” pop the back, noexcept.
  • template<typename _Up = _Tp> constexpr __gnu_cxx::__enable_if<!std::__are_same< _Up, bool >::__value, void >::__type push_back (_Tp &&__x) β€” the _Up = _Tp push_back overload with that same enable_if.
  • constexpr void push_back (const _Tp &__x) β€” push a const _Tp value.
  • constexpr const_reverse_iterator rbegin () const noexcept β€” const reverse rbegin.
  • constexpr reverse_iterator rbegin () noexcept β€” non-const reverse rbegin.
  • constexpr const_reverse_iterator rend () const noexcept β€” const reverse rend.
  • constexpr reverse_iterator rend () noexcept β€” non-const reverse rend.
  • constexpr void reserve (size_type __n) β€” reserve __n.
  • constexpr void resize (size_type __sz) β€” resize to __sz.
  • constexpr void resize (size_type __sz, const _Tp &__c) β€” resize to __sz with __c.
  • constexpr void shrink_to_fit () β€” shrink to fit.
  • constexpr void swap (vector &__x) noexcept(/*conditional */) β€” swap, with the conditional noexcept exactly as the page shows.

πŸ›‘οΈ Protected Member Functions πŸ›‘οΈ

  • bool _M_requires_reallocation (size_type __elements) const noexcept β€” the reallocation-check helper, const noexcept.
  • constexpr void _M_swap (_Safe_container &__x) noexcept β€” swap with a _Safe_container, noexcept.
  • constexpr void _M_update_guaranteed_capacity () noexcept β€” updates the guaranteed capacity, noexcept.

🧚 Protected Attributes 🧚

  • size_type _M_guaranteed_capacity β€” the guaranteed-capacity member.

🀝 Friends 🀝

  • template<typename _ItT , typename _SeqT , typename _CatT > class ::__gnu_debug::_Safe_iterator β€” friend class, bestie privileges.

🌈 Detailed Description 🌈

template<typename _Tp, typename _Allocator = std::allocator<_Tp>>
class std::__debug::vector< _Tp, _Allocator >

"Class std::vector with safety/checking/debug instrumentation." periodt. It's literally the debug container vibe: std::vector, but with safety/checking/debug instrumentation energy. πŸ’–

🧚 Constructor & Destructor Documentation 🧚

template<typename _Tp , typename _Allocator  = std::allocator<_Tp>>
constexpr std::__debug::vector< _Tp, _Allocator >::vector (_Base_ref __x) [inline],  [constexpr]

Construction from a normal-mode vector. That's the one with _Base_ref __x, and the docs mark it [inline], [constexpr]. Slay. ✨

πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for libstdc++ from the source code. Not a human author, just Doxygen doing its thing. πŸ’…


Sign-off bestie: source/version is libstdc++; date: the footer date field is truncated/mangled in this copy, so I'm not inventing one. 🫢✨

πŸ“¦ where this page comes from