STD::DEQUE(3)
π«Ά std::deque< _Tp, _Alloc > π«Ά
Library Functions Manual Β· section 3 π
okay bestie. sit down. hydrate. because we are about to talk about the container. this is std::deque< _Tp, _Alloc >, and it is genuinely that girl. π
β¨ NAME β¨
std::deque< _Tp, _Alloc > β a standard container using fixed-size memory allocation and constant-time manipulation of elements at either end. π
yes. either end. both. at once. iconic behaviour honestly. π¦
πΈ SYNOPSIS πΈ
#include <deque>
Inherits std::_Deque_base< _Tp, _Alloc >.
bestie note: it's a base class situation, not a "has-a". the deque is a _Deque_base. we love a nepo baby with actual talent. π
π Public Types π
typedef _Alloc allocator_typetypedef _Base::const_iterator const_iteratortypedef _Alloc_traits::const_pointer const_pointertypedef _Alloc_traits::const_reference const_referencetypedef std::reverse_iterator< const_iterator > const_reverse_iteratortypedef ptrdiff_t difference_typetypedef _Base::iterator iteratortypedef _Alloc_traits::pointer pointertypedef _Alloc_traits::reference referencetypedef std::reverse_iterator< iterator > reverse_iteratortypedef size_t size_typetypedef _Tp value_type
look at that little family. π«Ά every one of them is spelled exactly like that, don't you dare "clean them up".
π Public Member Functions π
deque ()=defaultβ Creates a deque with no elements. empty. blank slate. main character pre-glow-up era. β¨template<typename _InputIterator, typename = std::_RequireInputIter<_InputIterator>> deque (_InputIterator __first, _InputIterator __last, const allocator_type &__a=allocator_type())β Builds a deque from a range. πdeque (const allocator_type &__a)β Creates a deque with no elements.deque (const deque &__x)β Deque copy constructor. twin energy. π―deque (const deque &__x, const __type_identity_t< allocator_type > &__a)β Copy constructor with alternative allocator.deque (deque &&)=defaultβ Deque move constructor. it's giving "you take the couch, i'm out". π¨deque (deque &&__x, const __type_identity_t< allocator_type > &__a)β Move constructor with alternative allocator.deque (initializer_list< value_type > __l, const allocator_type &__a=allocator_type())β Builds a deque from an initializer list. πdeque (size_type __n, const allocator_type &__a=allocator_type())β Creates a deque with default constructed elements.deque (size_type __n, const value_type &__value, const allocator_type &__a=allocator_type())β Creates a deque with copies of an exemplar element.~deque ()β the goodbye. πtemplate<typename _InputIterator, typename = std::_RequireInputIter<_InputIterator>> void assign (_InputIterator __first, _InputIterator __last)β Assigns a range to a deque.void assign (initializer_list< value_type > __l)β Assigns an initializer list to a deque.void assign (size_type __n, const value_type &__val)β Assigns a given value to a deque.reference at (size_type __n)β Provides access to the data contained in the deque.const_reference at (size_type __n) constβ Provides access to the data contained in the deque.const_reference back () const noexceptreference back () noexceptconst_iterator begin () const noexceptiterator begin () noexceptconst_iterator cbegin () const noexceptconst_iterator cend () const noexceptvoid clear () noexceptconst_reverse_iterator crbegin () const noexceptconst_reverse_iterator crend () const noexcepttemplate<typename... _Args> iterator emplace (const_iterator __position, _Args &&... __args)β Inserts an object in deque before specified iterator.template<typename... _Args> reference emplace_back (_Args &&... __args)template<typename... _Args> reference emplace_front (_Args &&... __args)bool empty () const noexceptconst_iterator end () const noexceptiterator end () noexceptiterator erase (const_iterator __first, const_iterator __last)β Remove a range of elements. βοΈiterator erase (const_iterator __position)β Remove element at given position.const_reference front () const noexceptreference front () noexceptallocator_type get_allocator () const noexceptβ Get a copy of the memory allocation object.iterator insert (const_iterator __p, initializer_list< value_type > __l)β Inserts an initializer list into the deque.template<typename _InputIterator, typename = std::_RequireInputIter<_InputIterator>> iterator insert (const_iterator __position, _InputIterator __first, _InputIterator __last)β Inserts a range into the deque.iterator insert (const_iterator __position, const value_type &__x)β Inserts given value into deque before specified iterator.iterator insert (const_iterator __position, size_type __n, const value_type &__x)β Inserts a number of copies of given data into the deque.iterator insert (const_iterator __position, value_type &&__x)β Inserts given rvalue into deque before specified iterator.size_type max_size () const noexceptdeque & operator= (const deque &__x)β Deque assignment operator.deque & operator= (deque &&__x) noexcept(_Alloc_traits::_S_always_equal())β Deque move assignment operator. note thenoexcept(_Alloc_traits::_S_always_equal())right there, she's conditional and she's proud of it. πdeque & operator= (initializer_list< value_type > __l)β Assigns an initializer list to a deque.const_reference operator[] (size_type __n) const noexceptβ Subscript access to the data contained in the deque.reference operator[] (size_type __n) noexceptβ Subscript access to the data contained in the deque.void pop_back () noexceptβ Removes last element.void pop_front () noexceptβ Removes first element.void push_back (const value_type &__x)β Add data to the end of the deque.void push_back (value_type &&__x)void push_front (const value_type &__x)β Add data to the front of the deque.void push_front (value_type &&__x)const_reverse_iterator rbegin () const noexceptreverse_iterator rbegin () noexceptconst_reverse_iterator rend () const noexceptreverse_iterator rend () noexceptvoid resize (size_type __new_size)β Resizes the deque to the specified number of elements.void resize (size_type __new_size, const value_type &__x)β Resizes the deque to the specified number of elements.void shrink_to_fit () noexceptsize_type size () const noexceptvoid swap (deque &__x) noexceptβ Swaps data with another deque. trading places, but make it legal. π
π Protected Types π
enum { _S_initial_map_size }typedef __gnu_cxx::__alloc_traits< _Map_alloc_type > _Map_alloc_traitstypedef _Alloc_traits::template rebind< _Ptr >::other _Map_alloc_typetypedef _Alloc_traits::pointer _Ptrtypedef _Alloc_traits::const_pointer _Ptr_const
these are the protected ones bestie. not for public consumption. we're just peeking respectfully. π
π§ Protected Member Functions π§
template<typename _ForwardIterator> void _M_assign_aux (_ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag)template<typename _InputIterator> void _M_assign_aux (_InputIterator __first, _InputIterator __last, std::input_iterator_tag)void _M_deallocate_map (_Map_pointer __p, size_t __n) noexceptvoid _M_default_append (size_type __n)void _M_default_initialize ()template<typename _Alloc1> void _M_destroy_data (iterator __first, iterator __last, const _Alloc1 &)void _M_destroy_data (iterator __first, iterator __last, const std::allocator< _Tp > &)void _M_destroy_data_aux (iterator __first, iterator __last)template<typename... _Args> iterator _M_emplace_aux (iterator __pos, _Args &&... __args)iterator _M_erase (iterator __first, iterator __last)iterator _M_erase (iterator __pos)void _M_erase_at_begin (iterator __pos)void _M_erase_at_end (iterator __pos)void _M_fill_assign (size_type __n, const value_type &__val)void _M_fill_initialize (const value_type &__value)β Fills the deque with copies of value.void _M_fill_insert (iterator __pos, size_type __n, const value_type &__x)_Map_alloc_type _M_get_map_allocator () const noexcepttemplate<typename _ForwardIterator> void _M_insert_aux (iterator __pos, _ForwardIterator __first, _ForwardIterator __last, size_type __n)iterator _M_insert_aux (iterator __pos, const value_type &__x)void _M_insert_aux (iterator __pos, size_type __n, const value_type &__x)void _M_move_assign1 (deque &&__x, false_type)void _M_move_assign1 (deque &&__x, true_type) noexceptvoid _M_move_assign2 (deque &&__x, false_type)void _M_move_assign2 (deque &&__x, true_type)template<typename _InputIterator, typename _Sentinel> void _M_range_append (_InputIterator __first, _Sentinel __last, size_type __n)void _M_range_check (size_type __n) constβ Safety check used only fromat().template<typename _ForwardIterator> void _M_range_insert_aux (iterator __pos, _ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag)template<typename _InputIterator> void _M_range_insert_aux (iterator __pos, _InputIterator __first, _InputIterator __last, std::input_iterator_tag)template<typename _InputIterator, typename _Sentinel> void _M_range_prepend (_InputIterator __first, _Sentinel __last, size_type __n)template<typename... _Args> void _M_replace_map (_Args &&... __args)bool _M_shrink_to_fit ()
and then the little sub-clique inside the protected section, same list, just indented:
template<typename _InputIterator> void _M_range_initialize (_InputIterator __first, _InputIterator __last, std::input_iterator_tag)β Fills the deque with whatever is in[first,last).template<typename _ForwardIterator> void _M_range_initialize (_ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag)β Fills the deque with whatever is in[first,last).template<typename... _Args> void _M_push_back_aux (_Args &&... __args)β Helper functions forpush_*andpop_*.template<typename... _Args> void _M_push_front_aux (_Args &&... __args)β Helper functions forpush_*andpop_*.void _M_pop_back_aux ()β Helper functions forpush_*andpop_*.void _M_pop_front_aux ()β Helper functions forpush_*andpop_*.iterator _M_reserve_elements_at_front (size_type __n)β Memory-handling helpers for the previous internal insert functions.iterator _M_reserve_elements_at_back (size_type __n)β Memory-handling helpers for the previous internal insert functions.void _M_new_elements_at_front (size_type __new_elements)β Memory-handling helpers for the previous internal insert functions.void _M_new_elements_at_back (size_type __new_elements)β Memory-handling helpers for the previous internal insert functions.void _M_reserve_map_at_back (size_type __nodes_to_add=1)β Memory-handling helpers for the major map. note the default,__nodes_to_add=1. she comes with a default. πvoid _M_reserve_map_at_front (size_type __nodes_to_add=1)β Memory-handling helpers for the major map.void _M_reallocate_map (size_type __nodes_to_add, bool __add_at_front)β Memory-handling helpers for the major map.
β Static Protected Member Functions β
static size_t _S_check_init_len (size_t __n, const allocator_type &__a)static size_type _S_max_size (const _Tp_alloc_type &__a) noexcept
okay that's the whole types-and-functions lineup for part 1, and we are NOT done yet bestie β the rest is coming. stay hydrated, stay seated, do not close the tab. π
πΈ DETAILED DESCRIPTION πΈ
okay bestie, buckle up π this is the part where we get into how std::deque actually lives its life, and honestly? it's giving genius.
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
class std::deque< _Tp, _Alloc >
"A standard container using fixed-size memory allocation and constant-time manipulation of elements at either end." β constant-time at either end, yes ma'am, that's the whole flex π
π Template Parameters
_Tpβ Type of element._Allocβ Allocator type, defaults toallocator<_Tp>.
Meets the requirements of a container, a reversible container, and a sequence, including the optional sequence requirements. slay β¨
ok so quick lore drop π« in previous HP/SGI versions of deque, there was an extra template parameter so users could control the node size. This extension turned out to violate the C++ standard (it can be detected using template template parameters), and it was removed. rip to that extension, you will not be missed π
π§ how the memory actually works (iykyk)
Here's how a deque<Tp> manages memory. Each deque has 4 members:
Tp** _M_mapsize_t _M_map_sizeiterator _M_start,_M_finish
map_size is at least 8. map is an array of map_size pointers-to-nodes. (The name map has nothing to do with the std::map class, and nodes should not be confused with std::list's usage of node.) <-- important, do not get confused bestie, they are NOT the same thing π
A node has no specific type name as such, but it is referred to as node in this file. It is a simple array-of-Tp. If Tp is very large, there will be one Tp element per node (i.e., an array of one). For non-huge Tp's, node size is inversely related to Tp size: the larger the Tp, the fewer Tp's will fit in a node. The goal here is to keep the total size of a node relatively small and constant over different Tp's, to improve allocator efficiency. π
Not every pointer in the map array will point to a node. If the initial number of elements in the deque is small, the /middle/ map pointers will be valid, and the ones at the edges will be unused. This same situation will arise as the map grows: available map pointers, if any, will be on the ends. As new nodes are created, only a subset of the map's pointers need to be copied outward. efficient queen π
π Class invariants
- For any nonsingular iterator
i:i.nodepoints to a member of themaparray. (Yes, you read that correctly:i.nodedoes not actually point to a node.) The member of the map array is what actually points to the node.i.first == *(i.node)(This points to the node (firstTpelement).)i.last == i.first + node_sizei.curis a pointer in the range[i.first, i.last). NOTE: the implication of this is thati.curis always a dereferenceable pointer, even ifiis a past-the-end iterator.
- Start and Finish are always nonsingular iterators. NOTE: this means that an empty deque must have one node, a deque with <N elements (where N is the node buffer size) must have one node, a deque with N through (2N-1) elements must have two nodes, etc.
- For every node other than
start.nodeandfinish.node, every element in the node is an initialized object. Ifstart.node == finish.node, then[start.cur, finish.cur)are initialized objects, and the elements outside that range are uninitialized storage. Otherwise,[start.cur, start.last)and[finish.first, finish.cur)are initialized objects, and[start.first, start.cur)and[finish.cur, finish.last)are uninitialized storage. [map, map + map_size)is a valid, non-empty range.[start.node, finish.node]is a valid range contained within[map, map + map_size).- A pointer in the range
[map, map + map_size)points to an allocated node if and only if the pointer is in the range[start.node, finish.node].
Here's the magic: nothing in deque is aware of the discontiguous storage! π€― like she literally does not know and does not care
The memory setup and layout occurs in the parent, _Base, and the iterator class is entirely responsible for leaping from one node to the next. All the implementation routines for deque itself work only through the start and finish iterators. This keeps the routines simple and sane, and we can use other standard algorithms as well. π«Ά main character iterator energy fr fr
π CONSTRUCTOR & DESTRUCTOR DOCUMENTATION π
π deque () β [default]
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
std::deque< _Tp, _Alloc >::deque ()
Creates a deque with no elements. β¨ literally the empty girlie, no thoughts, just vibes
Referenced by insert(), and operator=().
π deque (const allocator_type & __a) β [inline], [explicit]
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
std::deque< _Tp, _Alloc >::deque (const allocator_type & __a)
Creates a deque with no elements.
Parameters
__aβ An allocator object.
π deque (size_type __n, const allocator_type & __a = allocator_type()) β [inline], [explicit]
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
std::deque< _Tp, _Alloc >::deque (size_type __n, const allocator_type & __a = allocator_type())
Creates a deque with default constructed elements.
Parameters
__nβ The number of elements to initially create.__aβ An allocator.
This constructor fills the deque with n default constructed elements.
π deque (size_type __n, const value_type & __value, const allocator_type & __a = allocator_type()) β [inline]
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
std::deque< _Tp, _Alloc >::deque (size_type __n, const value_type & __value, const allocator_type & __a = allocator_type())
Creates a deque with copies of an exemplar element.
Parameters
__nβ The number of elements to initially create.__valueβ An element to copy.__aβ An allocator.
This constructor fills the deque with __n copies of __value. copy-paste but make it fashion π
π deque (const deque< _Tp, _Alloc > & __x) β [inline]
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
std::deque< _Tp, _Alloc >::deque (const deque< _Tp, _Alloc > & __x)
Deque copy constructor. π«Ά
Parameters
__xβ A deque of identical element and allocator types.
The newly-created deque uses a copy of the allocator object used by __x (unless the allocator traits dictate a different object).
π deque (deque< _Tp, _Alloc > && ) β [default]
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
std::deque< _Tp, _Alloc >::deque (deque< _Tp, _Alloc > && )
Deque move constructor. The newly-created deque contains the exact contents of the moved instance. The contents of the moved instance are a valid, but unspecified deque.
heads up bestie: after the move, the moved-from deque is "valid, but unspecified" β that means it exists, it's legal, but do NOT count on what's inside it. valid but feral π
π deque (const deque< _Tp, _Alloc > & __x, const __type_identity_t< allocator_type > & __a) β [inline]
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
std::deque< _Tp, _Alloc >::deque (const deque< _Tp, _Alloc > & __x, const __type_identity_t< allocator_type > & __a)
Copy constructor with alternative allocator.
π deque (deque< _Tp, _Alloc > && __x, const __type_identity_t< allocator_type > & __a) β [inline]
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
std::deque< _Tp, _Alloc >::deque (deque< _Tp, _Alloc > && __x, const __type_identity_t< allocator_type > & __a)
Move constructor with alternative allocator.
π deque (initializer_list< value_type > __l, const allocator_type & __a = allocator_type()) β [inline]
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
std::deque< _Tp, _Alloc >::deque (initializer_list< value_type > __l, const allocator_type & __a = allocator_type())
Builds a deque from an initializer list. π
Parameters
__lβ Aninitializer_list.__aβ An allocator object.
Create a deque consisting of copies of the elements in the initializer_list __l.
This will call the element type's copy constructor N times (where N is __l.size()) and do no memory reallocation.
π deque (_InputIterator __first, _InputIterator __last, const allocator_type & __a = allocator_type()) β [inline]
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
template<typename _InputIterator, typename = std::_RequireInputIter<_InputIterator>>
std::deque< _Tp, _Alloc >::deque (_InputIterator __first, _InputIterator __last, const allocator_type & __a = allocator_type())
Builds a deque from a range. π¦
Parameters
__firstβ An input iterator.__lastβ An input iterator.__aβ An allocator object.
Create a deque consisting of copies of the elements from [__first, __last).
If the iterators are forward, bidirectional, or random-access, then this will call the elements' copy constructor N times (where N is distance(__first,__last)) and do no memory reallocation. But if only input iterators are used, then this will do at most 2N calls to the copy constructor, and logN memory reallocations. so like... know your iterator category bestie, it changes the whole vibe check π
π ~deque () β [inline]
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
std::deque< _Tp, _Alloc >::~deque ()
The dtor only erases the elements, and note that if the elements themselves are pointers, the pointed-to memory is not touched in any way. Managing the pointer is the user's responsibility. β οΈ
no cap, this one matters: if your deque holds raw pointers, destroying the deque does NOT free what they point to. that's on you, bestie. she cleans up her own mess only π
β¨ MEMBER FUNCTION DOCUMENTATION β¨
π¦ _M_fill_initialize (const value_type & __value) β [protected]
template<typename _Tp, typename _Alloc>
void deque::_M_fill_initialize (const value_type & __value)
Fills the deque with copies of value.
Parameters
__valueβ Initial value.
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).
References std::_Destroy().
Referenced by std::deque< _Tp, polymorphic_allocator< _Tp > >::deque().
π¦ _M_new_elements_at_back (size_type __new_elements) β [protected]
template<typename _Tp, typename _Alloc>
void deque::_M_new_elements_at_back (size_type __new_elements)
Memory-handling helpers for the previous internal insert functions.
References _M_reserve_map_at_back(), max_size(), and std::size().
Referenced by std::deque< _Tp, polymorphic_allocator< _Tp > >::_M_reserve_elements_at_back().
π¦ _M_new_elements_at_front (size_type __new_elements) β [protected]
template<typename _Tp, typename _Alloc>
void deque::_M_new_elements_at_front (size_type __new_elements)
Memory-handling helpers for the previous internal insert functions.
References _M_reserve_map_at_front(), max_size(), and std::size().
Referenced by std::deque< _Tp, polymorphic_allocator< _Tp > >::_M_reserve_elements_at_front().
π¦ _M_pop_back_aux () β [protected]
template<typename _Tp, typename _Alloc>
void deque::_M_pop_back_aux ()
Helper functions for push_* and pop_*.
Referenced by std::deque< _Tp, polymorphic_allocator< _Tp > >::pop_back().
π¦ _M_pop_front_aux () β [protected]
template<typename _Tp, typename _Alloc>
void deque::_M_pop_front_aux ()
Helper functions for push_* and pop_*.
Referenced by std::deque< _Tp, polymorphic_allocator< _Tp > >::pop_front().
π¦ _M_push_back_aux (_Args &&... __args) β [protected]
template<typename _Tp, typename _Alloc>
template<typename... _Args>
void deque::_M_push_back_aux (_Args &&... __args)
Helper functions for push_* and pop_*.
References _M_reserve_map_at_back(), std::forward(), max_size(), and std::size().
Referenced by std::deque< _Tp, polymorphic_allocator< _Tp > >::push_back().
π¦ _M_push_front_aux (_Args &&... __args) β [protected]
template<typename _Tp, typename _Alloc>
template<typename... _Args>
void deque::_M_push_front_aux (_Args &&... __args)
Helper functions for push_* and pop_*.
References _M_reserve_map_at_front(), std::forward(), max_size(), and std::size().
Referenced by std::deque< _Tp, polymorphic_allocator< _Tp > >::push_front().
π¦ _M_range_check (size_type __n) const β [inline], [protected]
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
void std::deque< _Tp, _Alloc >::_M_range_check (size_type __n) const
Safety check used only from at(). π‘οΈ
Referenced by std::deque< _Tp, polymorphic_allocator< _Tp > >::at(), and std::deque< _Tp, polymorphic_allocator< _Tp > >::at().
π«Ά deque::_M_range_initialize β the forward-iterator glow-up
template<typename _Tp, typename _Alloc> template<typename _ForwardIterator>
void deque::_M_range_initialize (_ForwardIterator __first,
_ForwardIterator __last, std::forward_iterator_tag ) [protected]
Okay so bestie, this one fills the deque with whatever is in [first,last). That's the whole vibe. β¨
Parameters
__firstβ an input iterator. π__lastβ an input iterator. π
Now here's the tea: if the iterators are actually forward iterators (or better), then the memory layout can be done all at once, in one big slay. Else we move forward using push_back on each value from the iterator, one by one, like texting your bestie individually instead of making a group chat. π
- References β
std::_Destroy(),std::advance(), andstd::distance().
π¦ deque::_M_range_initialize β the input-iterator remix
template<typename _Tp, typename _Alloc> template<typename _InputIterator>
void deque::_M_range_initialize (_InputIterator __first, _InputIterator
__last, std::input_iterator_tag ) [protected]
Same energy, different tag: this one also fills the deque with whatever is in [first,last).
Parameters
__firstβ an input iterator. πΈ__lastβ an input iterator. πΈ
And again: if the iterators are actually forward iterators (or better), then the memory layout can be done all at once. Else we move forward using push_back on each value from the iterator. Periodt. π
- References β
clear(), andpush_back(). - Referenced by β
std::deque< _Tp, polymorphic_allocator< _Tp > >::deque(), andstd::deque< _Tp, polymorphic_allocator< _Tp > >::deque(). (Yes bestie, it's listed twice, that's literally what the page says, I don't make the rules π« )
π deque::_M_reallocate_map
template<typename _Tp, typename _Alloc> void deque::_M_reallocate_map
(size_type __nodes_to_add, bool __add_at_front) [protected]
Memory-handling helpers for the major map. π
The way this one works: it makes sure the _M_map has space for new nodes. It does NOT actually add the nodes β it's just making room, like clearing a shelf before you buy more Squishmallows. π§Έ
β οΈ It can invalidate _M_map pointers. (And consequently, deque iterators.) So if you were holding onto an iterator, uh, that's a you problem now. π
- References β
std::max(), andmax_size(). - Referenced by β
std::deque< _Tp, polymorphic_allocator< _Tp > >::_M_reserve_map_at_back(), andstd::deque< _Tp, polymorphic_allocator< _Tp > >::_M_reserve_map_at_front().
π deque::_M_reserve_elements_at_back
template<typename _Tp, typename _Alloc = std::allocator<_Tp>> iterator
std::deque< _Tp, _Alloc >::_M_reserve_elements_at_back (size_type __n)
[inline], [protected]
Memory-handling helpers for the previous internal insert functions. That's it, that's the whole description, no cap. It's giving "internal, don't worry about it" energy. π
π deque::_M_reserve_elements_at_front
template<typename _Tp, typename _Alloc = std::allocator<_Tp>> iterator
std::deque< _Tp, _Alloc >::_M_reserve_elements_at_front (size_type __n)
[inline], [protected]
Memory-handling helpers for the previous internal insert functions. Same sentence, same energy, just the front-flavored version. β¨
π deque::_M_reserve_map_at_back
template<typename _Tp, typename _Alloc = std::allocator<_Tp>> void
std::deque< _Tp, _Alloc >::_M_reserve_map_at_back (size_type
__nodes_to_add = 1) [inline], [protected]
Memory-handling helpers for the major map. Makes sure the _M_map has space for new nodes. Does not actually add the nodes. Can invalidate _M_map pointers β and consequently, deque iterators. π
- Referenced by β
_M_new_elements_at_back(), and_M_push_back_aux().
π deque::_M_reserve_map_at_front
template<typename _Tp, typename _Alloc = std::allocator<_Tp>> void
std::deque< _Tp, _Alloc >::_M_reserve_map_at_front (size_type
__nodes_to_add = 1) [inline], [protected]
Memory-handling helpers for the major map. Makes sure the _M_map has space for new nodes. Does not actually add the nodes. Can invalidate _M_map pointers β and consequently, deque iterators. π«
- Referenced by β
_M_new_elements_at_front(), and_M_push_front_aux().
π deque::assign β the iterator-range edition
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
template<typename _InputIterator, typename =
std::_RequireInputIter<_InputIterator>> void std::deque< _Tp, _Alloc
>::assign (_InputIterator __first, _InputIterator __last) [inline]
Assigns a range to a deque. π
Parameters
__firstβ an input iterator. πΈ__lastβ an input iterator. πΈ
This function fills a deque with copies of the elements in the range [__first,__last).
π¨ Heads up: the assignment completely changes the deque, and the resulting deque's size is the same as the number of elements assigned. So don't come crying that your old stuff vanished β it was never gonna survive this. π
π deque::assign β the initializer-list edition
template<typename _Tp, typename _Alloc = std::allocator<_Tp>> void
std::deque< _Tp, _Alloc >::assign (initializer_list< value_type > __l)
[inline]
Assigns an initializer list to a deque. β¨
Parameters
__lβ aninitializer_list. π
This function fills a deque with copies of the elements in the initializer_list __l.
π¨ Same warning, bestie: the assignment completely changes the deque, and the resulting deque's size is the same as the number of elements assigned. It's giving "out with the old, in with the new." π
π deque::assign β the n-copies-of-a-value edition
template<typename _Tp, typename _Alloc = std::allocator<_Tp>> void
std::deque< _Tp, _Alloc >::assign (size_type __n, const value_type &
__val) [inline]
Assigns a given value to a deque. πΈ
Parameters
__nβ number of elements to be assigned.__valβ value to be assigned.
This function fills a deque with n copies of the given value. And you already know the note: the assignment completely changes the deque and the resulting deque's size is the same as the number of elements assigned. π
π§ deque::at β read/write version
template<typename _Tp, typename _Alloc = std::allocator<_Tp>> reference
std::deque< _Tp, _Alloc >::at (size_type __n) [inline]
Provides access to the data contained in the deque. π
Parameters
__nβ the index of the element for which data should be accessed.
Returns
- Read/write reference to data. π₯
Exceptions
std::out_of_rangeβ if__nis an invalid index.
This function provides for safer data access. The parameter is first checked that it is in the range of the deque. The function throws out_of_range if the check fails. So like, this is the version with a seatbelt. π
π§ deque::at β the const edition
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
const_reference std::deque< _Tp, _Alloc >::at (size_type __n) const
[inline]
Provides access to the data contained in the deque. πΈ
Parameters
__nβ the index of the element for which data should be accessed.
Returns
- Read-only (constant) reference to data. β¨
Exceptions
std::out_of_rangeβ if__nis an invalid index.
Again: safer data access. The parameter is first checked that it is in the range of the deque, and the function throws out_of_range if the check fails. No peeking past the edge, bestie. π
π deque::back β const edition
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
const_reference std::deque< _Tp, _Alloc >::back () const [inline],
[nodiscard], [noexcept]
Returns a read-only (constant) reference to the data at the last element of the deque. The literal last one. The final girl. π
π deque::back β read/write edition
template<typename _Tp, typename _Alloc = std::allocator<_Tp>> reference
std::deque< _Tp, _Alloc >::back () [inline], [nodiscard], [noexcept]
Returns a read/write reference to the data at the last element of the deque. Same last element, but now you can actually edit it. Main character energy. π₯
πΈ deque::begin β const edition
template<typename _Tp, typename _Alloc = std::allocator<_Tp>> const_iterator
std::deque< _Tp, _Alloc >::begin () const [inline], [nodiscard],
[noexcept]
Returns a read-only (constant) iterator that points to the first element in the deque. Iteration is done in ordinary element order. π¦
πΈ deque::begin β read/write edition
template<typename _Tp, typename _Alloc = std::allocator<_Tp>> iterator
std::deque< _Tp, _Alloc >::begin () [inline], [nodiscard], [noexcept]
Returns a read/write iterator that points to the first element in the deque. Iteration is done in ordinary element order. β¨
- Referenced by β
std::deque< _Tp, polymorphic_allocator< _Tp > >::deque(),std::deque< _Tp, polymorphic_allocator< _Tp > >::deque(),std::deque< _Tp, polymorphic_allocator< _Tp > >::~deque(),std::deque< _Tp, polymorphic_allocator< _Tp > >::clear(),std::deque< _Tp, polymorphic_allocator< _Tp > >::front(),std::deque< _Tp, polymorphic_allocator< _Tp > >::front(),std::deque< _Tp, polymorphic_allocator< _Tp > >::insert(),std::deque< _Tp, polymorphic_allocator< _Tp > >::insert(),std::deque< _Tp, polymorphic_allocator< _Tp > >::insert(),std::operator<=>(), andoperator=(). (It's booked and busy fr fr π )
π deque::cbegin
template<typename _Tp, typename _Alloc = std::allocator<_Tp>> const_iterator
std::deque< _Tp, _Alloc >::cbegin () const [inline], [noexcept]
Returns a read-only (constant) iterator that points to the first element in the deque. Iteration is done in ordinary element order. π
- Referenced by β
std::deque< _Tp, polymorphic_allocator< _Tp > >::insert(),std::deque< _Tp, polymorphic_allocator< _Tp > >::insert(), andstd::deque< _Tp, polymorphic_allocator< _Tp > >::insert().
π deque::cend
template<typename _Tp, typename _Alloc = std::allocator<_Tp>> const_iterator
std::deque< _Tp, _Alloc >::cend () const [inline], [noexcept]
Returns a read-only (constant) iterator that points one past the last element in the deque. Iteration is done in ordinary element order. One past the last β like the empty seat at the end of the row. π«Ά
π§Ή deque::clear
template<typename _Tp, typename _Alloc = std::allocator<_Tp>> void
std::deque< _Tp, _Alloc >::clear () [inline], [noexcept]
Erases all the elements. Full reset, clean slate, new era. β¨
β οΈ But listen: this function only erases the elements, and if the elements themselves are pointers, the pointed-to memory is not touched in any way. Managing the pointer is the user's responsibility. So like, clear() is not your cleanup crew, bestie, it's just the eraser. π
- Referenced by β
_M_range_initialize().
π¦ deque::crbegin
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
const_reverse_iterator std::deque< _Tp, _Alloc >::crbegin () const
[inline], [noexcept]
Returns a read-only (constant) reverse iterator that points to the last element in the deque. Iteration is done in reverse element order. Backwards, but make it fashion. π
π¦ deque::crend
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
const_reverse_iterator std::deque< _Tp, _Alloc >::crend () const
[inline], [noexcept]
Returns a read-only (constant) reverse iterator that points to one before the first element in the deque. Iteration is done in reverse element order. πΈ
π deque::emplace
template<typename _Tp, typename _Alloc> template<typename... _Args> deque<
_Tp, _Alloc >::iterator deque::emplace (const_iterator __position, _Args
&&... __args)
Inserts an object in deque before specified iterator. π
Parameters
__positionβ aconst_iteratorinto the deque. π__argsβ arguments.
Returns
- An iterator that points to the inserted data. β¨
This function will insert an object of type T constructed with T(std::forward<Args>(args)...) before the specified location. It builds the thing right there in place, no copy, no drama. π₯
- References β
std::forward(). - Referenced by β
std::deque< _Tp, polymorphic_allocator< _Tp > >::insert().
π«§ deque::empty
template<typename _Tp, typename _Alloc = std::allocator<_Tp>> bool
std::deque< _Tp, _Alloc >::empty () const [inline], [nodiscard],
[noexcept]
Returns true if the deque is empty. (Thus begin() would equal end().) π
β deque::end β const edition
template<typename _Tp, typename _Alloc = std::allocator<_Tp>> const_iterator
std::deque< _Tp, _Alloc >::end () const [inline], [nodiscard],
[noexcept]
Returns a read-only (constant) iterator that points one past the last element in the deque. Iteration is done in ordinary element order. π
β deque::end β read/write edition
template<typename _Tp, typename _Alloc = std::allocator<_Tp>> iterator
std::deque< _Tp, _Alloc >::end () [inline], [nodiscard], [noexcept]
Returns a read/write iterator that points one past the last element in the deque. Iteration is done in ordinary element order. That's the finish line, not the last element β one past it. Don't dereference it, bestie, I'm begging. ππ«Ά
- Referenced by
std::deque< _Tp, polymorphic_allocator< _Tp > >::deque(),std::deque< _Tp, polymorphic_allocator< _Tp > >::deque(),std::deque< _Tp, polymorphic_allocator< _Tp > >::~deque(),std::deque< _Tp, polymorphic_allocator< _Tp > >::back(),std::deque< _Tp, polymorphic_allocator< _Tp > >::back(),std::operator<=>(), andoperator=().
ποΈ erase β the range version
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
iterator
std::deque< _Tp, _Alloc >::erase (const_iterator __first, const_iterator __last) [inline]
Remove a range of elements. Yes bestie, plural, a whole range, we're not being shy about it π
Parameters
__firstβ iterator pointing to the first element to be erased. π―__lastβ iterator pointing to one past the last element to be erased.
Returns
An iterator pointing to the element pointed to by last prior to erasing (or end()).
So like, this function will erase the elements in the range [__first,__last) and shorten the deque accordingly. Iconic. β¨
β οΈ Caution, babes: this function only erases the elements. If the elements themselves are pointers, the pointed-to memory is not touched in any way. Managing the pointer is the user's responsibility. That's on you, not on the deque. No cap. π
ποΈ erase β the single-element version
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
iterator
std::deque< _Tp, _Alloc >::erase (const_iterator __position) [inline]
Remove element at given position. One at a time, we love a precise queen. π
Parameters
__positionβ iterator pointing to the element to be erased.
Returns
An iterator pointing to the next element (or end()).
This function will erase the element at the given position and thus shorten the deque by one. π
β οΈ Same warning, same energy: this function only erases the element, and if the element is itself a pointer, the pointed-to memory is not touched in any way. Managing the pointer is the user's responsibility. π«Ά
π₯ front β const flavour
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
const_reference
std::deque< _Tp, _Alloc >::front () const [inline], [nodiscard], [noexcept]
Returns a read-only (constant) reference to the data at the first element of the deque. Look but don't touch, respectfully. π
π₯ front β the read/write flavour
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
reference
std::deque< _Tp, _Alloc >::front () [inline], [nodiscard], [noexcept]
Returns a read/write reference to the data at the first element of the deque. Now this one you can edit. Main character energy at index zero. π
π§Ύ get_allocator
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
allocator_type
std::deque< _Tp, _Alloc >::get_allocator () const [inline], [nodiscard], [noexcept]
Get a copy of the memory allocation object. Just a little photocopy of the allocator, nbd. π¨οΈ
Referenced by operator=().
β insert β initializer_list version
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
iterator
std::deque< _Tp, _Alloc >::insert (const_iterator __p, initializer_list< value_type > __l) [inline]
Inserts an initializer list into the deque. Curly braces girlies, this one's for you. π
Parameters
__pβ an iterator into the deque.__lβ aninitializer_list.
Returns
An iterator that points to the inserted data.
This function will insert copies of the data in the initializer_list __l into the deque before the location specified by __p. This is known as list insert. Slay. β¨
β insert β the range version
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
template<typename _InputIterator, typename = std::_RequireInputIter<_InputIterator>>
iterator
std::deque< _Tp, _Alloc >::insert (const_iterator __position, _InputIterator __first, _InputIterator __last) [inline]
Inserts a range into the deque. Bulk insertion, we're efficient here. π
Parameters
__positionβ aconst_iteratorinto the deque.__firstβ an input iterator.__lastβ an input iterator.
Returns
An iterator that points to the inserted data.
This function will insert copies of the data in the range [__first,__last) into the deque before the location specified by __position. This is known as range insert. π
β insert β insert one value before an iterator
template<typename _Tp, typename _Alloc>
deque< _Tp, _Alloc >::iterator
deque::insert (const_iterator __position, const value_type & __x)
Inserts given value into deque before specified iterator.
Parameters
__positionβ aconst_iteratorinto the deque.__xβ data to be inserted.
Returns
An iterator that points to the inserted data.
This function will insert a copy of the given value before the specified location. π«°
References deque(), insert(), push_back(), and push_front().
Referenced by insert().
β insert β n copies of a value
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
iterator
std::deque< _Tp, _Alloc >::insert (const_iterator __position, size_type __n, const value_type & __x) [inline]
Inserts a number of copies of given data into the deque. Same value, many times, it's giving clone army. π―
Parameters
__positionβ aconst_iteratorinto the deque.__nβ number of elements to be inserted.__xβ data to be inserted.
Returns
An iterator that points to the inserted data.
This function will insert a specified number of copies of the given data before the location specified by __position. β¨
β insert β rvalue version
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
iterator
std::deque< _Tp, _Alloc >::insert (const_iterator __position, value_type && __x) [inline]
Inserts given rvalue into deque before specified iterator. Moving that value in, we love a relocation arc. π
Parameters
__positionβ aconst_iteratorinto the deque.__xβ data to be inserted.
Returns
An iterator that points to the inserted data.
This function will insert a copy of the given rvalue before the specified location. π₯
π max_size
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
size_type
std::deque< _Tp, _Alloc >::max_size () const [inline], [nodiscard], [noexcept]
Returns the size() of the largest possible deque. Like, theoretically. The ceiling. The absolute limit. π
Referenced by _M_new_elements_at_back(), _M_new_elements_at_front(), _M_push_back_aux(), _M_push_front_aux(), and _M_reallocate_map().
π operator= β copy assignment
template<typename _Tp, typename _Alloc>
deque< _Tp, _Alloc > &
deque::operator= (const deque< _Tp, _Alloc > & __x)
Deque assignment operator.
Parameters
__xβ a deque of identical element and allocator types.
All the elements of x are copied. π
The newly-created deque uses a copy of the allocator object used by __x (unless the allocator traits dictate a different object). iykyk. π§
References deque(), std::__addressof(), begin(), end(), get_allocator(), size(), and std::size().
π operator= β move assignment
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
deque &
std::deque< _Tp, _Alloc >::operator= (deque< _Tp, _Alloc > && __x) [inline], [noexcept]
Deque move assignment operator. We're relocating, not copying. Efficiency queen. π
Parameters
__xβ a deque of identical element and allocator types.
The contents of __x are moved into this deque (without copying, if the allocators permit it). __x is a valid, but unspecified deque. π (yes that's a real caveat, don't come for me)
π operator= β initializer_list assignment
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
deque &
std::deque< _Tp, _Alloc >::operator= (initializer_list< value_type > __l) [inline]
Assigns an initializer list to a deque.
Parameters
__lβ aninitializer_list.
This function fills a deque with copies of the elements in the initializer_list __l. β¨
Note that the assignment completely changes the deque and that the resulting deque's size() is the same as the number of elements assigned. Total glow-up, full reset. π
π’ operator[] β const subscript
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
const_reference
std::deque< _Tp, _Alloc >::operator[] (size_type __n) const [inline], [nodiscard], [noexcept]
Subscript access to the data contained in the deque.
Parameters
__nβ the index of the element for which data should be accessed.
Returns
Read-only (constant) reference to data.
This operator allows for easy, array-style, data access. π
β οΈ Real talk: data access with this operator is unchecked andout_of_rangelookups are not defined. (For checked lookups seeat().) She does not check IDs at the door, bestie. πͺπ
π’ operator[] β read/write subscript
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
reference
std::deque< _Tp, _Alloc >::operator[] (size_type __n) [inline], [nodiscard], [noexcept]
Subscript access to the data contained in the deque.
Parameters
__nβ the index of the element for which data should be accessed.
Returns
Read/write reference to data.
This operator allows for easy, array-style, data access. π
β οΈ Same energy: data access with this operator is unchecked andout_of_rangelookups are not defined. (For checked lookups seeat().) π«Ά
π€ pop_back
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
void
std::deque< _Tp, _Alloc >::pop_back () [inline], [noexcept]
Removes last element. This is a typical stack operation. It shrinks the deque by one. π
Note that no data is returned, and if the last element's data is needed, it should be retrieved before pop_back() is called. Grab it first or it's gone forever, babes. π
π€ pop_front
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
void
std::deque< _Tp, _Alloc >::pop_front () [inline], [noexcept]
Removes first element. This is a typical stack operation. It shrinks the deque by one. π
Note that no data is returned, and if the first element's data is needed, it should be retrieved before pop_front() is called. Save it to a variable first, I'm begging. π
π₯ push_back
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
void
std::deque< _Tp, _Alloc >::push_back (const value_type & __x) [inline]
Add data to the end of the deque.
Parameters
__xβ data to be added.
This is a typical stack operation. The function creates an element at the end of the deque and assigns the given data to it. Due to the nature of a deque this operation can be done in constant time. O(1) queen, we love her. π₯
Referenced by _M_range_initialize(), and insert().
π₯ push_front
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
void
std::deque< _Tp, _Alloc >::push_front (const value_type & __x) [inline]
Add data to the front of the deque.
Parameters
__xβ data to be added.
This is a typical stack operation. The function creates an element at the front of the deque and assigns the given data to it. Due to the nature of a deque this operation can be done in constant time. Front insertion that isn't slow?? The way that a deque just does that. π
Referenced by insert().
βͺ rbegin β const reverse begin
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
const_reverse_iterator
std::deque< _Tp, _Alloc >::rbegin () const [inline], [nodiscard], [noexcept]
Returns a read-only (constant) reverse iterator that points to the last element in the deque. Iteration is done in reverse element order. Backwards, but make it fashion. π¦
βͺ rbegin β read/write reverse begin
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
reverse_iterator
std::deque< _Tp, _Alloc >::rbegin () [inline], [nodiscard], [noexcept]
Returns a read/write reverse iterator that points to the last element in the deque. Iteration is done in reverse element order. Editable and backwards, she contains multitudes. β¨
βͺ rend β const reverse end
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
const_reverse_iterator
std::deque< _Tp, _Alloc >::rend () const [inline], [nodiscard], [noexcept]
Returns a read-only (constant) reverse iterator that points to one before the first element in the deque. Iteration is done in reverse element order. πΈ
okay so continuing our deep dive into std::deque's member functions, bestie π we got a few more to cover, and they're all kinda iconic ngl. let's get into it β¨
rend() π
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
reverse_iterator std::deque< _Tp, _Alloc >::rend () [inline], [nodiscard], [noexcept]
Returns a read/write reverse iterator that points to one before the first element in the deque. Iteration is done in reverse element order.
it's giving [inline], [nodiscard] (so don't ignore that return value, bestie, that's rude), and [noexcept] (no throwing here, we're chill). slay π
resize(size_type __new_size) π
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
void std::deque< _Tp, _Alloc >::resize (size_type __new_size) [inline]
Parameters:
__new_sizeβ Number of elements the deque should contain.
This function will resize the deque to the specified number of elements. If the number is smaller than the deque's current size the deque is truncated, otherwise default constructed elements are appended.
so basically if you want it smaller, it gets cut off, and if you want it bigger, it fills in with default-constructed goodies. no cap π§
resize(size_type __new_size, const value_type & __x) π
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
void std::deque< _Tp, _Alloc >::resize (size_type __new_size, const value_type & __x) [inline]
Parameters:
__new_sizeβ Number of elements the deque should contain.__xβ Data with which new elements should be populated.
This function will resize the deque to the specified number of elements. If the number is smaller than the deque's current size the deque is truncated, otherwise the deque is extended and new elements are populated with given data.
so you can pass a little value __x and it'll copy that into all the new spots. obsessed π
shrink_to_fit() πͺ
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
void std::deque< _Tp, _Alloc >::shrink_to_fit () [inline], [noexcept]
A non-binding request to reduce memory use.
it's literally just a polite ask to the container, like "hey bestie, can you free up some space?" β but it's non-binding, so it might not actually do it. still iconic tho β¨
size() π
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
size_type std::deque< _Tp, _Alloc >::size () const [inline], [nodiscard], [noexcept]
Returns the number of elements in the deque.
Referenced by std::deque< _Tp, polymorphic_allocator< _Tp > >::_M_range_check(), std::operator<=>(), operator=(), std::deque< _Tp, polymorphic_allocator< _Tp > >::resize(), and std::deque< _Tp, polymorphic_allocator< _Tp > >::resize().
like, it's the headcount of your deque. [nodiscard] so you better use that number for something, and [noexcept] so it's safe. periodt π
swap(deque< _Tp, _Alloc > & __x) π
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
void std::deque< _Tp, _Alloc >::swap (deque< _Tp, _Alloc > & __x) [inline], [noexcept]
Parameters:
__xβ A deque of the same element and allocator types.
This exchanges the elements between two deques in constant time. (Four pointers, so it should be quite fast.) Note that the global std::swap() function is specialized such that std::swap(d1,d2) will feed to this function.
Whether the allocators are swapped depends on the allocator traits.
so it's a quick little trade β just swapping pointers, no biggie. four pointers and it's done, fr fr. and if you call std::swap(d1,d2) it'll route right here. iykyk π
Author βοΈ
Generated automatically by Doxygen for libstdc++ from the source code.
and that's a wrap on this page from libstdc++, specifically std::deque...p, _Alloc >(3) πΈ no cap, you just read the whole thing. you're literally the main character. slay π
πβ¨
π¦ where this page comes from
- arch rolling: gcc 16.2.1+r23+gd564253eb6c8-1 Β· GPL-3.0-or-later WITH GCC-exception-3.1 AND GFDL-1.3-or-later
- fedora 44: libstdc++-docs 16.2.1-2.fc44
- fedora 44: libstdc++-docs 16.2.1-3.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms