STD::VECTOR(3)

std::vector< _Tp, _Alloc > πŸ’– (3)

okay bestie, welcome to the Library Functions Manual β€” section 3, the one where all the good stuff lives. we're talking about std::vector< _Tp, _Alloc > today and honestly? she's the moment. the blueprint. the girl who does it all. πŸŽ€


✨ NAME ✨

std::vector< _Tp, _Alloc > β€” a standard container which offers fixed time access to individual elements in any order. πŸ¦‹

that's it. that's the whole pitch. fixed time access, any order you want, no notes. she's giving main character energy and she hasn't even gotten to the synopsis yet πŸ’…


okay so that was the intro, but we are SO not done β€” there is a whole SYNOPSIS and DESCRIPTION and honestly a ridiculous amount of options coming. stay with me, this is gonna be iconic ✨

πŸ’– SYNOPSIS πŸ’–

#include <vector>

Inherits std::_Vector_base< _Tp, _Alloc >. ✨


🌸 Inherited by 🌸

Like, the girlies that pulled their whole look from this base class, [private] edition:

  • std::match_results< _BidirectionalIterator, polymorphic_allocator< sub_match< _BidirectionalIterator > > > [private]
  • std::match_results< const char * > [private]
  • std::match_results< string::const_iterator > [private]
  • std::match_results< const wchar_t * > [private]
  • std::match_results< wstring::const_iterator > [private]
  • and . (bestie, that's genuinely what the page says, I'm not fixing it, I don't make the rules πŸ’€)

πŸŽ€ Public Types πŸŽ€

The whole wardrobe, aka the typedefs. No cap, these are the aliases you'll be saying out loud in your code:

  • typedef _Alloc allocator_type
  • typedef __gnu_cxx::__normal_iterator< const_pointer, vector > const_iterator
  • typedef _Alloc_traits::const_pointer const_pointer
  • typedef _Alloc_traits::const_reference const_reference
  • typedef std::reverse_iterator< const_iterator > const_reverse_iterator
  • typedef ptrdiff_t difference_type
  • typedef __gnu_cxx::__normal_iterator< pointer, vector > iterator
  • typedef _Base::pointer pointer
  • typedef _Alloc_traits::reference reference
  • typedef std::reverse_iterator< iterator > reverse_iterator
  • typedef size_t size_type
  • typedef _Tp value_type

That's the full set, all twelve, and yes I counted them for you. 🫢


πŸ‘‘ Public Member Functions πŸ‘‘

Okay this is the big one, the main character section. Every single one, in order, nothing skipped, periodt.

🌈 Constructors & Destructor

  • vector()=default β€” makes you a vector with, like, nothing in it. Empty. Void. A blank canvas bestie. ✨
  • template<typename _InputIterator, typename = std::_RequireInputIter<_InputIterator>> constexpr vector(_InputIterator __first, _InputIterator __last, const allocator_type &__a=allocator_type()) β€” builds a vector out of a whole range, __first to __last, with optional allocator __a.
  • constexpr vector(const allocator_type &__a) noexcept β€” also a vector with no elements, but you hand it an allocator __a this time.
  • constexpr vector(const vector &__x) β€” the copy constructor, she's duplicating herself πŸ’…
  • constexpr vector(const vector &__x, const __type_identity_t< allocator_type > &__a) β€” copy constructor but you get to swap in a different allocator __a.
  • constexpr vector(initializer_list< value_type > __l, const allocator_type &__a=allocator_type()) β€” builds a vector straight from an initializer list __l.
  • constexpr vector(size_type __n, const allocator_type &__a=allocator_type()) β€” __n elements, all default constructed. So many little blank slates.
  • constexpr vector(size_type __n, const value_type &__value, const allocator_type &__a=allocator_type()) β€” __n copies of your exemplar element __value. Iconic copy-paste energy.
  • vector(vector &&) noexcept=default β€” the move constructor. She's not copying, she's relocating. πŸ”₯
  • constexpr vector(vector &&__rv, const __type_identity_t< allocator_type > &__m) noexcept(noexcept(vector(std::declval< vector && >(), std::declval< const allocator_type & >(), std::declval< typename _Alloc_traits::is_always_equal >()))) β€” move constructor, but with an alternative allocator __m. Look at that noexcept clause, she's doing the absolute most and honestly? Slay.
  • constexpr ~vector() noexcept β€” destructor. Bye bestie, thanks for the memories. πŸ¦‹

🧚 Random Internal One

  • template<typename... _Args> constexpr auto _M_emplace_aux(const_iterator __position, _Args &&... __args) -> iterator β€” no description on the page, she's mysterious like that. Just vibes and a trailing return type.

πŸ’œ Assignment

  • template<typename _InputIterator, typename = std::_RequireInputIter<_InputIterator>> constexpr void assign(_InputIterator __first, _InputIterator __last) β€” assigns a range to your vector.
  • constexpr void assign(initializer_list< value_type > __l) β€” assigns an initializer list __l to your vector.
  • constexpr void assign(size_type __n, const value_type &__val) β€” assigns a given value __val to your vector.
  • constexpr vector & operator=(const vector &__x) β€” the assignment operator. Copy vibes.
  • constexpr vector & operator=(initializer_list< value_type > __l) β€” the list assignment operator, takes __l.
  • constexpr vector & operator=(vector &&__x) noexcept(_Alloc_traits::_S_nothrow_move()) β€” move assignment operator. Note that noexcept(_Alloc_traits::_S_nothrow_move()) β€” it only promises not to throw if that condition holds. 🀝

πŸ“ Access

  • constexpr reference at(size_type __n) β€” gives you access to the data inside, with __n as your index.
  • constexpr const_reference at(size_type __n) const β€” same deal, const flavored.
  • constexpr const_reference back() const noexcept β€” last element, const.
  • constexpr reference back() noexcept β€” last element, mutable.
  • constexpr const_iterator begin() const noexcept β€” start of the const party.
  • constexpr iterator begin() noexcept β€” start of the party.
  • constexpr size_type capacity() const noexcept β€” how much room she's got before she has to move house.
  • constexpr const_iterator cbegin() const noexcept β€” const begin, the c stands for const, not cute, but also cute.
  • constexpr const_iterator cend() const noexcept β€” const end.
  • constexpr void clear() noexcept β€” wipes everything. Clean slate era.
  • constexpr const_reverse_iterator crbegin() const noexcept β€” const reverse begin.
  • constexpr const_reverse_iterator crend() const noexcept β€” const reverse end.
  • constexpr const _Tp * data() const noexcept β€” raw pointer to the const data, she's showing you the real her.
  • constexpr _Tp * data() noexcept β€” raw pointer to the data, mutable version.
  • constexpr bool empty() const noexcept β€” is she empty? Yes or no, no in between.
  • constexpr const_iterator end() const noexcept β€” const end of the line.
  • constexpr iterator end() noexcept β€” end of the line.
  • constexpr const_reference front() const noexcept β€” first element, const.
  • constexpr reference front() noexcept β€” first element, mutable.
  • constexpr allocator_type get_allocator() const noexcept β€” hands you a copy of the memory allocation object. A copy! Don't forget that part.
  • constexpr const_reference operator[](size_type __n) const noexcept β€” subscript access to the data, const, __n is your index. Note: no bounds check on this one, bestie. She will not warn you. 🚨
  • constexpr reference operator[](size_type __n) noexcept β€” subscript access to the data, mutable, same deal, same lack of checks.
  • constexpr const_reverse_iterator rbegin() const noexcept β€” const reverse begin.
  • constexpr reverse_iterator rbegin() noexcept β€” reverse begin.
  • constexpr const_reverse_iterator rend() const noexcept β€” const reverse end.
  • constexpr reverse_iterator rend() noexcept β€” reverse end.

✨ Modifiers

  • template<typename... _Args> constexpr iterator emplace(const_iterator __position, _Args &&... __args) β€” inserts an object into the vector before the specified iterator __position. Constructed in place, no extra copy, she's efficient. πŸ’…
  • template<typename... _Args> constexpr reference emplace_back(_Args &&... __args) β€” no description given, just vibes and a reference return.
  • constexpr iterator erase(const_iterator __first, const_iterator __last) β€” removes a whole range of elements, __first through __last.
  • constexpr iterator erase(const_iterator __position) β€” removes the element at the given position.
  • template<typename _InputIterator, typename = std::_RequireInputIter<_InputIterator>> constexpr iterator insert(const_iterator __position, _InputIterator __first, _InputIterator __last) β€” inserts a range into the vector, before __position.
  • constexpr iterator insert(const_iterator __position, const value_type &__x) β€” inserts the given value __x into the vector before the specified iterator.
  • constexpr iterator insert(const_iterator __position, initializer_list< value_type > __l) β€” inserts an initializer list __l into the vector.
  • constexpr iterator insert(const_iterator __position, size_type __n, const value_type &__x) β€” inserts __n copies of __x into the vector.
  • constexpr iterator insert(const_iterator __position, value_type &&__x) β€” inserts the given rvalue __x into the vector before the specified iterator. Moves only.
  • constexpr size_type max_size() const noexcept β€” the absolute ceiling on how many she could hold.
  • constexpr void pop_back() noexcept β€” removes the last element. Bye.
  • constexpr void push_back(const value_type &__x) β€” adds data __x to the end of the vector.
  • constexpr void push_back(value_type &&__x) β€” same but rvalue, no description on the page, she's keeping it short.
  • constexpr void reserve(size_type __n) β€” attempts to preallocate enough memory for __n elements. Attempts. πŸ‘€
  • constexpr void resize(size_type __new_size) β€” resizes the vector to __new_size elements.
  • constexpr void resize(size_type __new_size, const value_type &__x) β€” resizes the vector to __new_size elements, using __x for the new ones.
  • constexpr void shrink_to_fit() β€” no description, she's just giving you less.
  • constexpr size_type size() const noexcept β€” how many elements she actually has right now.
  • constexpr void swap(vector &__x) noexcept β€” swaps data with another vector __x.

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

Backstage area. You're not supposed to be here unless you're writing a derived class, but here's the whole list anyway because I don't gatekeep. 🫢

  • constexpr pointer _M_allocate(size_t __n)
  • template<typename _ForwardIterator> constexpr pointer _M_allocate_and_copy(size_type __n, _ForwardIterator __first, _ForwardIterator __last)
  • template<typename _ForwardIterator> constexpr void _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag)
  • template<typename _InputIterator> constexpr void _M_assign_aux(_InputIterator __first, _InputIterator __last, std::input_iterator_tag)
  • template<typename _InputIterator> constexpr void _M_assign_dispatch(_InputIterator __first, _InputIterator __last, __false_type)
  • template<typename _Integer> constexpr void _M_assign_dispatch(_Integer __n, _Integer __val, __true_type)
  • constexpr size_type _M_check_len(size_type __n, const char *__s) const
  • constexpr void _M_create_storage(size_t __n)
  • constexpr void _M_deallocate(pointer __p, size_t __n)
  • constexpr void _M_default_append(size_type __n)
  • constexpr void _M_default_initialize(size_type __n)
  • template<typename... _Args> constexpr iterator _M_emplace_aux(const_iterator __position, _Args &&... __args)
  • constexpr iterator _M_emplace_aux(const_iterator __position, value_type &&__v)
  • constexpr iterator _M_erase(iterator __first, iterator __last)
  • constexpr iterator _M_erase(iterator __position)
  • constexpr void _M_erase_at_end(pointer __pos) noexcept
  • constexpr void _M_fill_append(size_type __n, const value_type &__x)
  • constexpr void _M_fill_assign(size_type __n, const value_type &__val)
  • constexpr void _M_fill_initialize(size_type __n, const value_type &__value)
  • constexpr void _M_fill_insert(iterator __pos, size_type __n, const value_type &__x)
  • constexpr const _Tp_alloc_type & _M_get_Tp_allocator() const noexcept
  • constexpr _Tp_alloc_type & _M_get_Tp_allocator() noexcept
  • template<typename _Arg> constexpr void _M_insert_aux(iterator __position, _Arg &&__arg)
  • template<typename _InputIterator> constexpr void _M_insert_dispatch(iterator __pos, _InputIterator __first, _InputIterator __last, __false_type)
  • template<typename _Integer> constexpr void _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __val, __true_type)
  • constexpr iterator _M_insert_rval(const_iterator __position, value_type &&__v)
  • constexpr void _M_range_check(size_type __n) const β€” safety check, and the page is very clear: it's used only from at(). Only. From at(). Remember that when you're out here rawdogging operator[]. 😭
  • template<typename _ForwardIterator> constexpr void _M_range_initialize(_ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag)
  • template<typename _InputIterator> constexpr void _M_range_initialize(_InputIterator __first, _InputIterator __last, std::input_iterator_tag)
  • template<typename _Iterator, typename _Sentinel> constexpr void _M_range_initialize_n(_Iterator __first, _Sentinel __last, size_type __n)
  • template<typename _ForwardIterator> constexpr void _M_range_insert(iterator __pos, _ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag)
  • template<typename _InputIterator> constexpr void _M_range_insert(iterator __pos, _InputIterator __first, _InputIterator __last, std::input_iterator_tag)
  • template<typename... _Args> constexpr void _M_realloc_append(_Args &&... __args)
  • template<typename... _Args> constexpr void _M_realloc_insert(iterator __position, _Args &&... __args)
  • constexpr bool _M_shrink_to_fit()

⭐ Static Protected Member Functions ⭐

Static, so they belong to the class itself, not to any one instance. Independent queens. πŸ‘‘

  • static constexpr size_type _S_check_init_len(size_type __n, const allocator_type &__a)
  • static constexpr size_type _S_max_size(const _Tp_alloc_type &__a) noexcept

πŸ¦‹ Protected Attributes πŸ¦‹

Just the one, and she's carrying the whole operation on her back:

  • _Vector_impl _M_impl

okay pausing here, more incoming, don't go anywhere πŸ’œ

✨ DETAILED DESCRIPTION ✨

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

Okay bestie, gather round, because this is the container. A standard container which offers fixed time access to individual elements in any order. That's the whole vibe. 🫢

Since

C++98 β€” yeah she's been iconic since forever, an OG, a legend, no notes. πŸ’…

Template Parameters

  • _Tp β€” Type of element. (whatever lil guy you're storing in here)
  • _Alloc β€” Allocator type, defaults to allocator<_Tp>. (the memory plug, and if you don't pick one she picks for you πŸŽ€)

Meets the requirements of a container, a reversible container, and a sequence, including the optional sequence requirements with the exception of push_front and pop_front.

⚠️ heads up bestie: she does not do push_front or pop_front. Front insertion is simply not her thing. Everything else in the optional sequence requirements? Slayed. βœ…

In some terminology a vector can be described as a dynamic C-style array, it offers fast and efficient access to individual elements in any order and saves the user from worrying about memory and size allocation. Subscripting ( [] ) access is also provided as with C-style arrays. So like, it's an array but it's grown up and handles its own business. No cap. 🌈


πŸŽ€ CONSTRUCTOR & DESTRUCTOR DOCUMENTATION πŸŽ€

vector () [default]

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
std::vector< _Tp, _Alloc >::vector ()

Creates a vector with no elements. Empty. A blank canvas. An icon before she's even started. ✨

Referenced by insert(), and operator=().


vector (const allocator_type & __a) [inline], [explicit], [constexpr], [noexcept]

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
std::vector< _Tp, _Alloc >::vector (const allocator_type & __a)

Creates a vector with no elements. (Yes, same energy as the one above, but you're bringing your own allocator to the function.)

Parameters

  • __a β€” An allocator object.

vector (size_type __n, const allocator_type & __a = allocator_type()) [inline], [explicit], [constexpr]

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
std::vector< _Tp, _Alloc >::vector (size_type __n, const allocator_type & __a = allocator_type())

Creates a vector with default constructed elements.

Parameters

  • __n β€” The number of elements to initially create.
  • __a β€” An allocator.

This constructor fills the vector with __n default constructed elements. So you say "gimme __n of them" and she gimme-__n-of-them. πŸ¦‹


vector (size_type __n, const value_type & __value, const allocator_type & __a = allocator_type()) [inline], [constexpr]

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
std::vector< _Tp, _Alloc >::vector (size_type __n, const value_type & __value, const allocator_type & __a = allocator_type())

Creates a vector 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 vector with __n copies of __value. Copy-paste but make it couture. πŸ’–


vector (const vector< _Tp, _Alloc > & __x) [inline], [constexpr]

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
std::vector< _Tp, _Alloc >::vector (const vector< _Tp, _Alloc > & __x)

Vector copy constructor.

Parameters

  • __x β€” A vector of identical element and allocator types.

All the elements of __x are copied, but any unused capacity in __x will not be copied (i.e. capacity() == size() in the new vector).

she copies the fits, not the closet space. Allocator note: the newly-created vector uses a copy of the allocator object used by __x (unless the allocator traits dictate a different object).

vector (vector< _Tp, _Alloc > && ) [default], [noexcept]

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
std::vector< _Tp, _Alloc >::vector (vector< _Tp, _Alloc > && )

Vector move constructor. The newly-created vector contains the exact contents of the moved instance. The contents of the moved instance are a valid, but unspecified vector.

⚠️ "valid, but unspecified" β€” do NOT go poking around in the moved-from vector expecting anything specific, bestie. She's valid, she's just not telling you what she is. πŸ’€

vector (const vector< _Tp, _Alloc > & __x, const __type_identity_t< allocator_type > & __a) [inline], [constexpr]

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
std::vector< _Tp, _Alloc >::vector (const vector< _Tp, _Alloc > & __x, const __type_identity_t< allocator_type > & __a)

Copy constructor with alternative allocator. Same copy energy, different plug. 🧚


vector (vector< _Tp, _Alloc > && __rv, const __type_identity_t< allocator_type > & __m) [inline], [constexpr], [noexcept]

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
std::vector< _Tp, _Alloc >::vector (vector< _Tp, _Alloc > && __rv, const __type_identity_t< allocator_type > & __m)

Move constructor with alternative allocator. She's moving and she brought her own plug. Multitasking queen. πŸ‘‘


vector (initializer_list< value_type > __l, const allocator_type & __a = allocator_type()) [inline], [constexpr]

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
std::vector< _Tp, _Alloc >::vector (initializer_list< value_type > __l, const allocator_type & __a = allocator_type())

Builds a vector from an initializer list.

Parameters

  • __l β€” An initializer_list.
  • __a β€” An allocator.

Create a vector 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. Clean, one shot, no messy reshuffling. ✨


vector (_InputIterator __first, _InputIterator __last, const allocator_type & __a = allocator_type()) [inline], [constexpr]

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
template<typename _InputIterator, typename = std::_RequireInputIter<_InputIterator>>
std::vector< _Tp, _Alloc >::vector (_InputIterator __first, _InputIterator __last, const allocator_type & __a = allocator_type())

Builds a vector from a range.

Parameters

  • __first β€” An input iterator.
  • __last β€” An input iterator.
  • __a β€” An allocator.

Create a vector 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. iykyk β€” the iterator category really does change the whole plot here. πŸ¦‹


~vector () [inline], [constexpr], [noexcept]

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
std::vector< _Tp, _Alloc >::~vector ()

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.

🚨 READ THIS TWICE, BESTIE: if your vector holds pointers, destructing the vector does NOT delete the things they point at. It deletes the pointers. The pointed-to memory is untouched. That's on you. She's not your mom. 😭

πŸ’… MEMBER FUNCTION DOCUMENTATION πŸ’…

_M_allocate_and_copy [inline], [constexpr], [protected]

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
template<typename _ForwardIterator>
pointer std::vector< _Tp, _Alloc >::_M_allocate_and_copy (size_type __n, _ForwardIterator __first, _ForwardIterator __last)

Memory expansion handler. Uses the member allocation function to obtain n bytes of memory, and then copies [first,last) into it. (internal machinery, protected, she does the heavy lifting behind the curtain πŸŽ€)

Referenced by operator=(), and reserve().


_M_range_check [inline], [constexpr], [protected]

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
void std::vector< _Tp, _Alloc >::_M_range_check (size_type __n) const

Safety check used only from at(). the little bouncer at the door checking your ID 🫢

Referenced by std::vector< _Tp, polymorphic_allocator< _Tp > >::at(), and std::vector< _Tp, polymorphic_allocator< _Tp > >::at().


assign (_InputIterator __first, _InputIterator __last) [inline], [constexpr]

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
template<typename _InputIterator, typename = std::_RequireInputIter<_InputIterator>>
void std::vector< _Tp, _Alloc >::assign (_InputIterator __first, _InputIterator __last)

Assigns a range to a vector.

Parameters

  • __first β€” An input iterator.
  • __last β€” An input iterator.

This function fills a vector with copies of the elements in the range [__first,__last).

Note that the assignment completely changes the vector and that the resulting vector's size is the same as the number of elements assigned. full glow-up, old contents GONE, new contents in. πŸ’…


assign (initializer_list< value_type > __l) [inline], [constexpr]

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
void std::vector< _Tp, _Alloc >::assign (initializer_list< value_type > __l)

Assigns an initializer list to a vector.

Parameters

  • __l β€” An initializer_list.

This function fills a vector with copies of the elements in the initializer list __l.

Note that the assignment completely changes the vector and that the resulting vector's size is the same as the number of elements assigned. new era, who dis. ✨


assign (size_type __n, const value_type & __val) [inline], [constexpr]

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
void std::vector< _Tp, _Alloc >::assign (size_type __n, const value_type & __val)

Assigns a given value to a vector.

Parameters

  • __n β€” Number of elements to be assigned.
  • __val β€” Value to be assigned.

This function fills a vector with __n copies of the given value. Note that the assignment completely changes the vector and that the resulting vector's size is the same as the number of elements assigned. same note, three times, because she means it: the assignment COMPLETELY changes the vector. πŸ”₯


at (size_type __n) [inline], [nodiscard], [constexpr]

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
reference std::vector< _Tp, _Alloc >::at (size_type __n)

Provides access to the data contained in the vector.

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 __n is an invalid index.

This function provides for safer data access. The parameter is first checked that it is in the range of the vector. The function throws out_of_range if the check fails. she checks before she lets you in β€” that's the whole difference between her and []. 🫢


at (size_type __n) const [inline], [nodiscard], [constexpr]

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
const_reference std::vector< _Tp, _Alloc >::at (size_type __n) const

Provides access to the data contained in the vector.

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 __n is an invalid index.

This function provides for safer data access. The parameter is first checked that it is in the range of the vector. The function throws out_of_range if the check fails. same safety bouncer, but this time you only get to LOOK. πŸ‘€


back () const [inline], [nodiscard], [constexpr], [noexcept]

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
const_reference std::vector< _Tp, _Alloc >::back () const

Returns a read-only (constant) reference to the data at the last element of the vector. The final girl. The last one standing. πŸŽ€


back () [inline], [nodiscard], [constexpr], [noexcept]

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
reference std::vector< _Tp, _Alloc >::back ()

Returns a read/write reference to the data at the last element of the vector. Now you can edit the last one too. Slay. πŸ’…


begin () const [inline], [nodiscard], [constexpr], [noexcept]

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
const_iterator std::vector< _Tp, _Alloc >::begin () const

Returns a read-only (constant) iterator that points to the first element in the vector. Iteration is done in ordinary element order. start at the front, go in order, no surprises. πŸ¦‹


begin () [inline], [nodiscard], [constexpr], [noexcept]

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
iterator std::vector< _Tp, _Alloc >::begin ()

Returns a read/write iterator that points to the first element in the vector. Iteration is done in ordinary element order.

Referenced by std::vector< _Tp, polymorphic_allocator< _Tp > >::vector(), std::vector< _Tp, polymorphic_allocator< _Tp > >::crend(), std::vector< _Tp, polymorphic_allocator< _Tp > >::empty(), std::vector< _Tp, polymorphic_allocator< _Tp > >::erase(), std::vector< _Tp, polymorphic_allocator< _Tp > >::erase(), std::vector< _Tp, polymorphic_allocator< _Tp > >::front(), std::vector< _Tp, polymorphic_allocator< _Tp > >::front(), std::vector< _Tp, polymorphic_allocator< _Tp > >::insert(), std::vector< _Tp, polymorphic_allocator< _Tp > >::insert(), std::vector< _Tp, polymorphic_allocator< _Tp > >::insert(), __gnu_parallel::multiway_merge_exact_splitting(), std::operator<=>(), operator=(), std::operator==(), std::vector< _Tp, polymorphic_allocator< _Tp > >::rend(), and std::vector< _Tp, polymorphic_allocator< _Tp > >::rend().

capacity()

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
size_type std::vector< _Tp, _Alloc >::capacity () const
[inline], [nodiscard], [constexpr], [noexcept]

okay bestie, this one tells you the total number of elements the vector can hold before it has to go allocate more memory πŸ’– like it's the seat count of the venue, and size() is how many people actually showed up. Capacity β‰₯ size, always, periodt.

  • Referenced by β€” operator=(), and reserve().

cbegin()

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
const_iterator std::vector< _Tp, _Alloc >::cbegin () const
[inline], [constexpr], [noexcept]

Hands you a read-only (constant) iterator pointing at the very first element in the vector πŸŽ€ and iteration happens in ordinary element order, no plot twists.

  • Referenced by β€” std::vector< _Tp, polymorphic_allocator< _Tp > >::erase(), std::vector< _Tp, polymorphic_allocator< _Tp > >::erase(), std::vector< _Tp, polymorphic_allocator< _Tp > >::insert(), std::vector< _Tp, polymorphic_allocator< _Tp > >::insert(), and std::vector< _Tp, polymorphic_allocator< _Tp > >::insert().

cend()

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
const_iterator std::vector< _Tp, _Alloc >::cend () const
[inline], [constexpr], [noexcept]

A read-only (constant) iterator that points one past the last element in the vector ✨ (yes one past β€” the classic off-the-end vibe, it's a marker not a real element, iykyk). Iteration is done in ordinary element order.


clear()

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
void std::vector< _Tp, _Alloc >::clear ()
[inline], [constexpr], [noexcept]

Erases all the elements 🌈 bye babes, everyone out.

⚠️ Read this part twice, fr fr: 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. So if you were hoping clear() would clean up your heap too… it will not, bestie, that's on you πŸ’€
  • Referenced by β€” operator=().

crbegin()

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
const_reverse_iterator std::vector< _Tp, _Alloc >::crbegin () const
[inline], [constexpr], [noexcept]

A read-only (constant) reverse iterator pointing at the last element in the vector πŸ¦‹ iteration is done in reverse element order β€” so like, backwards but make it const.


crend()

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
const_reverse_iterator std::vector< _Tp, _Alloc >::crend () const
[inline], [constexpr], [noexcept]

A read-only (constant) reverse iterator that points one before the first element in the vector 🌸 the reverse-end sentinel, the final boss of the backwards loop. Iteration is done in reverse element order.


data()

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
_Tp * std::vector< _Tp, _Alloc >::data ()
[inline], [nodiscard], [constexpr], [noexcept]

Returns a pointer such that [data(), data() + size()) is a valid range πŸ‘‘ and for a non-empty vector, data() == &front(). Raw pointer access, main character energy, use responsibly πŸ’…


emplace()

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
template<typename... _Args>
iterator std::vector< _Tp, _Alloc >::emplace
    (const_iterator __position, _Args &&... __args)
[inline], [constexpr]

Inserts an object in the vector before the specified iterator πŸŽ€

Parameters

  • __position β€” A const_iterator into the vector.
  • __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 ✨

Heads up: this kind of operation could be expensive for a vector, and if it is frequently used the user should consider using std::list. No cap β€” shuffling everything over is a lot of work for our girl.

empty()

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
bool std::vector< _Tp, _Alloc >::empty () const
[inline], [nodiscard], [constexpr], [noexcept]

Returns true if the vector is empty πŸ’– (Thus begin() would equal end(). Cute, right?)

  • Referenced by β€” std::piecewise_constant_distribution< _RealType >::densities(), std::piecewise_linear_distribution< _RealType >::densities(), and std::discrete_distribution< _IntType >::probabilities().

end() const

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
const_iterator std::vector< _Tp, _Alloc >::end () const
[inline], [nodiscard], [constexpr], [noexcept]

A read-only (constant) iterator that points one past the last element in the vector 🌸 iteration is done in ordinary element order.


end()

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
iterator std::vector< _Tp, _Alloc >::end ()
[inline], [nodiscard], [constexpr], [noexcept]

A read/write iterator that points one past the last element in the vector πŸ”₯ iteration is done in ordinary element order.

  • Referenced by β€” std::vector< _Tp, polymorphic_allocator< _Tp > >::vector(), std::vector< _Tp, polymorphic_allocator< _Tp > >::back(), std::vector< _Tp, polymorphic_allocator< _Tp > >::back(), std::vector< _Tp, polymorphic_allocator< _Tp > >::crbegin(), std::vector< _Tp, polymorphic_allocator< _Tp > >::empty(), __gnu_parallel::multiway_merge_exact_splitting(), std::operator<=>(), operator=(), std::operator==(), std::vector< _Tp, polymorphic_allocator< _Tp > >::rbegin(), and std::vector< _Tp, polymorphic_allocator< _Tp > >::rbegin().

erase() β€” the range one

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
iterator std::vector< _Tp, _Alloc >::erase
    (const_iterator __first, const_iterator __last)
[inline], [constexpr]

Remove a range of elements βœ‚οΈ

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()).

This function will erase the elements in the range [__first,__last) and shorten the vector accordingly πŸ’…

Note β€” This operation could be expensive and if it is frequently used the user should consider using std::list. The user is also cautioned that this function only erases the elements, and 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. Not me reminding you again… actually yes, me reminding you again πŸ™ˆ

erase() β€” the single-position one

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
iterator std::vector< _Tp, _Alloc >::erase (const_iterator __position)
[inline], [constexpr]

Remove the element at a given position 🎯

Parameters

  • __position β€” Iterator pointing to 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 vector by one 🌈

Note β€” This operation could be expensive and if it is frequently used the user should consider using std::list. The user is also cautioned that this function only erases the element, and that 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. Same warning, different overload, still true πŸ’€

front() const

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
const_reference std::vector< _Tp, _Alloc >::front () const
[inline], [nodiscard], [constexpr], [noexcept]

A read-only (constant) reference to the data at the first element of the vector πŸ₯‡ look but don't touch.


front()

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
reference std::vector< _Tp, _Alloc >::front ()
[inline], [nodiscard], [constexpr], [noexcept]

A read/write reference to the data at the first element of the vector πŸ”₯ go ahead, edit her.


std::_Vector_base< _Tp, _Alloc >::get_allocator()

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
allocator_type std::_Vector_base< _Tp, _Alloc >::get_allocator () const
[inline], [constexpr], [noexcept]

Get a copy of the memory allocation object πŸŽ€

  • References β€” get_allocator().
  • Referenced by β€” get_allocator().

(not her referencing and being referenced by herself… the recursion is giving self-care, honestly iconic πŸ’…βœ¨)


insert() β€” the range one

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
template<typename _InputIterator,
         typename = std::_RequireInputIter<_InputIterator>>
iterator std::vector< _Tp, _Alloc >::insert
    (const_iterator __position, _InputIterator __first, _InputIterator __last)
[inline], [constexpr]

Inserts a range into the vector 🌸

Parameters

  • __position β€” A const_iterator into the vector.
  • __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 vector before the location specified by pos ✨

Note that this kind of operation could be expensive for a vector and if it is frequently used the user should consider using std::list.

insert() β€” single const value_type&

template<typename _Tp, typename _Alloc>
vector< _Tp, _Alloc >::iterator vector::insert
    (const_iterator __position, const value_type & __x)
[constexpr]

Inserts a given value into the vector before the specified iterator πŸ’–

Parameters

  • __position β€” A const_iterator into the vector.
  • __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 πŸŽ€

Note that this kind of operation could be expensive for a vector and if it is frequently used the user should consider using std::list.
  • References β€” vector(), std::begin(), std::cbegin(), std::end(), insert(), and std::move().
  • Referenced by β€” insert().

insert() β€” the initializer_list one

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
iterator std::vector< _Tp, _Alloc >::insert
    (const_iterator __position, initializer_list< value_type > __l)
[inline], [constexpr]

Inserts an initializer_list into the vector πŸ¦‹

Parameters

  • __position β€” An iterator into the vector.
  • __l β€” An initializer_list.

This function will insert copies of the data in the initializer_list l into the vector before the location specified by position ✨

Note that this kind of operation could be expensive for a vector and if it is frequently used the user should consider using std::list.

insert() β€” __n copies of __x

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
iterator std::vector< _Tp, _Alloc >::insert
    (const_iterator __position, size_type __n, const value_type & __x)
[inline], [constexpr]

Inserts a number of copies of given data into the vector πŸŽ€

Parameters

  • __position β€” A const_iterator into the vector.
  • __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 ✨

Note that this kind of operation could be expensive for a vector and if it is frequently used the user should consider using std::list.

insert() β€” the rvalue one

template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
iterator std::vector< _Tp, _Alloc >::insert
    (const_iterator __position, value_type && __x)
[inline], [constexpr]

Inserts a given rvalue into the vector before the specified iterator πŸ’œ move semantics, she's moving, we love to see it.

Parameters

  • __position β€” A const_iterator into the vector.
  • __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 🌈

Note that this kind of operation could be expensive for a vector and if it is frequently used the user should consider using std::list.
  • max_size β€” the biggest size() a vector could ever possibly have. πŸ’–
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
size_type std::vector< _Tp, _Alloc >::max_size () const
  [inline], [nodiscard], [constexpr], [noexcept]

Returns the size() of the largest possible vector. That's it, that's the whole vibe. And bestie, reserve() literally references it, so it's pulling its weight. ✨


  • operator= (copy) β€” vector assignment operator, the classic "make this one look like that one" move. πŸ’…
template<typename _Tp, typename _Alloc>
vector< _Tp, _Alloc > & vector::operator= (const vector< _Tp, _Alloc > & __x)
  [constexpr]

Parameters

  • __x β€” a vector of identical element and allocator types.

All the elements of __x get copied over. But heads up: any unused capacity in __x does not get copied. Whether the allocator itself gets copied? That depends on the allocator traits, iykyk. πŸ¦‹

References: vector(), std::__addressof(), std::_Destroy(), _M_allocate_and_copy(), begin(), capacity(), clear(), std::end(), end(), std::size(), and size().


  • operator= (initializer list) β€” vector list assignment operator, for when you roll up with a lil {...}. πŸŽ€
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
vector & std::vector< _Tp, _Alloc >::operator= (initializer_list< value_type > __l)
  [inline], [constexpr]

Parameters

  • __l β€” an initializer_list.

This one fills a vector with copies of the elements in the initializer list __l.

Note that the assignment completely changes the vector β€” and the resulting vector's size is the same as the number of elements assigned. No leftovers, no half-measures, main character energy only. πŸ‘‘

  • operator= (move) β€” vector move assignment operator, the "no thoughts just yeet" version. πŸ’€
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
vector & std::vector< _Tp, _Alloc >::operator= (vector< _Tp, _Alloc > && __x)
  [inline], [constexpr], [noexcept]

Parameters

  • __x β€” a vector of identical element and allocator types.

The contents of __x get moved into this vector (without copying, if the allocators permit it). Afterwards __x is a valid, but unspecified vector. Which is fancy speak for "it's alive but it's not telling you what it's thinking." πŸ™ˆ

Whether the allocator is moved depends on the allocator traits.


  • operator[] (const) β€” subscript access to the data contained in the vector, read-only edition. 🧊
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
const_reference std::vector< _Tp, _Alloc >::operator[] (size_type __n) const
  [inline], [nodiscard], [constexpr], [noexcept]

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. But listen: data access with this operator is unchecked, and out_of_range lookups are not defined. For checked lookups, see at(). 🌸


  • operator[] β€” same subscript access, but read/write this time, go off. πŸ”₯
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
reference std::vector< _Tp, _Alloc >::operator[] (size_type __n)
  [inline], [nodiscard], [constexpr], [noexcept]

Parameters

  • __n β€” the index of the element for which data should be accessed.

Returns

  • Read/write reference to data.

Again: easy, array-style, data access. Again: access with this operator is unchecked and out_of_range lookups are not defined. (For checked lookups see at().) The warning is staying, bestie, it's important. 🫢


  • pop_back β€” removes the last element. It's giving stack operation. It shrinks the vector by one. πŸ“
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
void std::vector< _Tp, _Alloc >::pop_back ()
  [inline], [constexpr], [noexcept]
Note that no data is returned β€” so if you need the last element's data, grab it before you call pop_back(). Not after. It's gone. Not me learning this the hard way. 😭

  • push_back β€” add data to the end of the vector. ✨
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
void std::vector< _Tp, _Alloc >::push_back (const value_type & __x)
  [inline], [constexpr]

Parameters

  • __x β€” data to be added.

Typical stack operation. The function creates an element at the end of the vector and assigns the given data to it. And because of the nature of a vector, this can be done in constant time if the vector already has preallocated space available. Preallocate, bestie, it's the move. πŸ’…


  • rbegin (const) β€” a read-only (constant) reverse iterator pointing at the last element in the vector. πŸ¦‹
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
const_reverse_iterator std::vector< _Tp, _Alloc >::rbegin () const
  [inline], [nodiscard], [constexpr], [noexcept]

Iteration is done in reverse element order. Walking backwards, and honestly? Thriving.


  • rbegin β€” the read/write reverse iterator that points to the last element in the vector. 🌈
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
reverse_iterator std::vector< _Tp, _Alloc >::rbegin ()
  [inline], [nodiscard], [constexpr], [noexcept]

Iteration is done in reverse element order.


  • rend (const) β€” read-only (constant) reverse iterator pointing to one before the first element in the vector. πŸŽ€
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
const_reverse_iterator std::vector< _Tp, _Alloc >::rend () const
  [inline], [nodiscard], [constexpr], [noexcept]

Iteration is done in reverse element order. Yes, one before the first. That's the reverse-end thing, it's iconic, don't question it. πŸ‘‘


  • rend β€” the read/write reverse iterator pointing to one before the first element in the vector. ⭐
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
reverse_iterator std::vector< _Tp, _Alloc >::rend ()
  [inline], [nodiscard], [constexpr], [noexcept]

Iteration is done in reverse element order.


  • reserve β€” attempt to preallocate enough memory for a specified number of elements. The pre-planning queen. πŸ’–
template<typename _Tp, typename _Alloc>
void vector::reserve (size_type __n)
  [constexpr]

Parameters

  • __n β€” number of elements required.

Exceptions

  • std::length_error β€” if n exceeds max_size().

This function attempts to reserve enough memory for the vector to hold the specified number of elements. If the number requested is more than max_size(), length_error is thrown. 🚨

The advantage here: if optimal code is a necessity and you can figure out how many elements you'll need, you can reserve the memory in advance β€” and thus prevent a possible reallocation of memory and copying of vector data. So basically you're skipping the drama entirely. Slay.

References: std::_Destroy(), _M_allocate_and_copy(), capacity(), max_size(), and std::size().


  • resize (one-arg) β€” resizes the vector to the specified number of elements. πŸ“
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
void std::vector< _Tp, _Alloc >::resize (size_type __new_size)
  [inline], [constexpr]

Parameters

  • __new_size β€” number of elements the vector should contain.

This function will resize the vector to the specified number of elements. If the number is smaller than the vector's current size, the vector gets truncated. Otherwise, default constructed elements are appended. 🌱

Referenced by __gnu_parallel::__shrink_and_double(), and __gnu_parallel::multiway_merge_exact_splitting().


  • resize (two-arg) β€” resizes the vector, but now you get to pick what fills the new slots. 🎨
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
void std::vector< _Tp, _Alloc >::resize (size_type __new_size, const value_type & __x)
  [inline], [constexpr]

Parameters

  • __new_size β€” number of elements the vector should contain.
  • __x β€” data with which new elements should be populated.

This function will resize the vector to the specified number of elements. If the number is smaller than the vector's current size, the vector gets truncated. Otherwise the vector is extended and the new elements are populated with the given data. ✨


  • shrink_to_fit β€” a non-binding request to reduce capacity() to size(). 🫢
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
void std::vector< _Tp, _Alloc >::shrink_to_fit ()
  [inline], [constexpr]

Non-binding means the vector can literally just say "no πŸ’…" and keep its capacity. It's a request, not a demand. Respect the boundaries.


  • size β€” returns the number of elements in the vector. The moment of truth. πŸ”’
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
size_type std::vector< _Tp, _Alloc >::size () const
  [inline], [nodiscard], [constexpr], [noexcept]

Returns the number of elements in the vector.

Referenced by __gnu_parallel::__shrink(), __gnu_parallel::__shrink_and_double(), std::vector< _Tp, polymorphic_allocator< _Tp > >::_M_range_check(), __gnu_parallel::list_partition(), operator=(), std::operator==(), std::vector< _Tp, polymorphic_allocator< _Tp > >::resize(), and std::vector< _Tp, polymorphic_allocator< _Tp > >::resize().


  • swap β€” swaps data with another vector. The trade deal of the century. 🀝
template<typename _Tp, typename _Alloc = std::allocator<_Tp>>
void std::vector< _Tp, _Alloc >::swap (vector< _Tp, _Alloc > & __x)
  [inline], [constexpr], [noexcept]

Parameters

  • __x β€” a vector of the same element and allocator types.

This exchanges the elements between two vectors in constant time. (Three pointers, so it should be quite fast.) Note that the global std::swap() function is specialized such that std::swap(v1,v2) will feed into this function. πŸ”₯

Whether the allocators are swapped depends on the allocator traits.


πŸ‘‘ Author

Generated automatically by Doxygen for libstdc++ from the source code.


And that's the whole page, bestie β€” every last byte of it. πŸŽ€ This part came straight out of the libstdc++ docs, the classic std::vector manpage, page footer reading libstdc++ on the left and std::vecto..., _Alloc >(3) on the right. Thanks for reading all five parts, that's commitment, that's loyalty, that's genuinely iconic of you. Go preallocate something. πŸ’–βœ¨πŸ¦‹

πŸ“¦ 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.0.1-0.10.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
  • 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