__GNU_DEBUG::_SAFE_VECTOR(3)
π NAME π
okay bestie, say hi to __gnu_debug::_Safe_vector< _SafeSequence, _BaseSequence > β she's the base class for Debug Mode vector β¨. Like, the momager of debug-mode vectors. She's in the Library Functions Manual, she's iconic, she's lowkey doing the most behind the scenes π
π SYNOPSIS π
first things first, you gotta pull her in:
#include <vector>
and she's inherited by... wait no, std::__debug::vector< _Tp, _Allocator >. That's the nepo baby. Adorable. We support her π«Ά
β¨ Protected Member Functions β¨
these are the family-only functions, no randos allowed:
constexpr _Safe_vector (_Safe_vector &&__x) noexceptβ move-constructs her, and she will not throw at you, periodtconstexpr _Safe_vector (const _Safe_vector &) noexceptβ copy-constructs her, alsonoexcept, she's unbothered fr frconstexpr _Safe_vector (size_type __n) noexceptβ builds her with a size of__n, againnoexcept, she simply does not have the range for exceptionsbool _M_requires_reallocation (size_type __elements) const noexceptβ asks the question: do we need to reallocate for__elements? returns abool,const,noexcept, a whole vibe check π¦constexpr void _M_update_guaranteed_capacity () noexceptβ refreshes the guaranteed capacity info, returnsvoidbecause she gives, not takes πconstexpr _Safe_vector & operator= (_Safe_vector &&__x) noexceptβ move-assign, hands back a reference to herself,noexceptconstexpr _Safe_vector & operator= (const _Safe_vector &) noexceptβ copy-assign, also hands back_Safe_vector &, alsonoexcept
πΈ Protected Attributes πΈ
size_type _M_guaranteed_capacityβ her little diary entry π tracking the guaranteed capacity. main character data, honestly
π Detailed Description π
template<typename _SafeSequence, typename _BaseSequence>
class __gnu_debug::_Safe_vector< _SafeSequence, _BaseSequence >
so what does she even do, bestie? she's the base class for Debug Mode vector π no cap.
and then β the plot twist β she adds information about the guaranteed capacity. Which is genuinely so useful, because it's how you catch code that's out here relying on non-portable implementation details of the libstdc++ reallocation policy π like girl, that's not portable, that's not it, put it down π
π§ Author π§
she was generated automatically by Doxygen for libstdc++ from the source code. not a human author, just a robot doing her lil thing π€β¨
okay that's the whole page, mwah π shoutout to libstdc++ for this one, generated straight from the source code β love that for us π«Άπβ
π¦ 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