__GNU_DEBUG::_SAFE_CONTAINER(3)

πŸ’– NAME πŸ’–

__gnu_debug::_Safe_container< _SafeContainer, _Alloc, _SafeBase, _IsCxx11AllocatorAware > β€” the safe class dealing with some allocator dependent operations. that's the whole job bestie, and it does it flawlessly πŸ’…


✨ SYNOPSIS ✨

#include <safe_container.h>

πŸ¦‹ Inherited by

okay so this one is the main character of the debug containers, no cap β€” literally all of these inherit from it:

__gnu_debug::basic_string< char >
__gnu_debug::basic_string< wchar_t >
__gnu_debug::basic_string< char16_t >
__gnu_debug::basic_string< char32_t >
std::__debug::forward_list< _Tp, _Alloc >
std::__debug::iterator< _Tp, _Alloc >
__gnu_debug::basic_string< _CharT, _Traits, _Allocator >
std::__debug::deque< _Tp, _Allocator >
std::__debug::forward_list< _Tp, _Alloc >
std::__debug::list< _Tp, _Allocator >
std::__debug::map< _Key, _Tp, _Compare, _Allocator >
std::__debug::multimap< _Key, _Tp, _Compare, _Allocator >
std::__debug::multiset< _Key, _Compare, _Allocator >
std::__debug::set< _Key, _Compare, _Allocator >
std::__debug::unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc >
std::__debug::unordered_multimap< _Key, _Tp, _Hash, _Pred, _Alloc >
std::__debug::unordered_multiset< _Value, _Hash, _Pred, _Alloc >
std::__debug::unordered_set< _Value, _Hash, _Pred, _Alloc >
std::__debug::vector< _Tp, _Allocator >

the way that's literally the entire debug STL family tree… ate and left no crumbs πŸ“


πŸŽ€ Protected Member Functions πŸŽ€

these are protected, so they're for the class's own use and its children β€” not for you to just call whenever, bestie πŸ™ˆ

  • _Safe_container (_Safe_container &&)=default β€” move constructor, defaulted, no notes 🫢
  • constexpr _Safe_container (_Safe_container &&__x, const _Alloc &__a) β€” move constructor that also takes an allocator __a, and it's constexpr so it's giving ✨
  • _Safe_container (const _Safe_container &)=default β€” copy constructor, defaulted 🌸
  • constexpr void _M_swap (const _Safe_container &__x) const noexcept β€” swaps with __x, constexpr, const noexcept, fully iconic
  • constexpr _Safe_container & operator= (_Safe_container &&__x) noexcept β€” move assignment, returns a reference to itself, noexcept πŸ”₯
  • constexpr _Safe_container & operator= (const _Safe_container &) noexcept=default β€” copy assignment, defaulted, noexcept, constexpr

πŸ‘‘ Detailed Description πŸ‘‘

template<typename _SafeContainer, typename _Alloc, template< typename >
class _SafeBase, bool _IsCxx11AllocatorAware = true>
class __gnu_debug::_Safe_container< _SafeContainer, _Alloc, _SafeBase, _IsCxx11AllocatorAware >

and the vibe? "Safe class dealing with some allocator dependent operations. periodt πŸ’œ

four template params, one job: be the safe base that handles the allocator-dependent bits so everything downstream doesn't have to. lowkey genius, highkey underrated 🧚


🌈 Author 🌈

Generated automatically by Doxygen for libstdc++ from the source code. yes it's a robot author and yes it still slayed πŸ’€


okay that's the whole page bestie, go forth and vibe-check your containers responsibly πŸ¦‹ this was libstdc++'s __gnu_debu...atorAware >(3) page, from the Library Functions Manual, and that's the tea πŸ’…βœ¨

πŸ“¦ 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