__gnu_debug(3)

πŸ’– __gnu_debug(3) β€” Library Functions Manual πŸ’–

okay bestie, welcome to __gnu_debug(3), the GNU debug classes page. This is literally the public-use debug glow-up for libstdc++ β€” safety, checking, and debug instrumentation, iykyk. It's giving main character energy for your containers. No cap. πŸŽ€βœ¨

We're doing part 1, so let's get into the classes, typedefs, and enums. Buckle up. πŸ¦‹


✨ NAME ✨

__gnu_debug β€” GNU debug classes for public use. πŸ’…


🌸 SYNOPSIS 🌸

πŸ‘‘ Classes πŸ‘‘

  • class _After_nth_from β€” no description in the manpage, just the name. Keep scrolling. πŸ’–
  • struct _BeforeBeginHelper β€” also no description, just the struct name. πŸ¦‹
  • class _Equal_to β€” no description. ✨
  • class _Not_equal_to β€” no description. πŸ’«
  • class _Safe_container β€” a safe class that handles some allocator-dependent operations. πŸ‘‘
  • class _Safe_forward_list β€” special iterator swap and invalidation for forward_list, all because of the before_begin iterator. πŸ¦‹
  • class _Safe_iterator β€” the safe iterator wrapper, slay. πŸ’…
  • class _Safe_iterator_base β€” basic functionality for a safe iterator. ✨
  • class _Safe_local_iterator β€” safe iterator wrapper, but local. πŸ’–
  • class _Safe_local_iterator_base β€” basic functionality for a safe iterator. 🌸
  • class _Safe_node_sequence β€” like _Safe_sequence, but with a special _M_invalidate_all implementation not invalidating past-the-end iterators. Used by node based sequence. πŸ”₯
  • class _Safe_sequence β€” base class for constructing a safe sequence type that tracks iterators that reference it. πŸ‘‘
  • class _Safe_sequence_base β€” base class that supports tracking of iterators that reference a sequence. πŸ’œ
  • class _Safe_unordered_container β€” base class for constructing a safe unordered container type that tracks iterators that reference it. 🌈
  • class _Safe_unordered_container_base β€” base class that supports tracking of local iterators that reference an unordered container. πŸ¦‹
  • class _Safe_vector β€” base class for Debug Mode vector. ✨
  • struct _Sequence_traits β€” no description, just the struct. πŸŽ€
  • class basic_string β€” std::basic_string with safety/checking/debug instrumentation. πŸ’…
  • class type_info β€” part of RTTI. πŸ’–

πŸŽ€ Typedefs πŸŽ€

  • typedef basic_string< char > string β€” the classic. πŸ’…
  • typedef basic_string< char16_t > u16string β€” a string of char16_t. ✨
  • typedef basic_string< char32_t > u32string β€” a string of char32_t. 🌸
  • typedef basic_string< wchar_t > wstring β€” wide string energy. πŸ¦‹

πŸ”₯ Enumerations πŸ”₯

The _Debug_msg_id enum is a whole alphabet of debug messages, and _Distance_precision is its own precision vibe. Exact declarations, no edits, fr fr:

       enum _Debug_msg_id { __msg_valid_range, __msg_insert_singular,
           __msg_insert_different, __msg_erase_bad, __msg_erase_different,
           __msg_subscript_oob, __msg_empty, __msg_unpartitioned,
           __msg_unpartitioned_pred, __msg_unsorted, __msg_unsorted_pred,
           __msg_not_heap, __msg_not_heap_pred, __msg_bad_bitset_write,
           __msg_bad_bitset_read, __msg_bad_bitset_flip, __msg_self_splice,
           __msg_splice_alloc, __msg_splice_bad, __msg_splice_other,
           __msg_splice_overlap, __msg_init_singular, __msg_init_copy_singular,
           __msg_init_const_singular, __msg_copy_singular, __msg_bad_deref,
           __msg_bad_inc, __msg_bad_dec, __msg_iter_subscript_oob,
           __msg_advance_oob, __msg_retreat_oob, __msg_iter_compare_bad,
           __msg_compare_different, __msg_iter_order_bad,
           __msg_order_different, __msg_distance_bad, __msg_distance_different,
           __msg_deref_istream, __msg_inc_istream, __msg_output_ostream,
           __msg_deref_istreambuf, __msg_inc_istreambuf,
           __msg_insert_after_end, __msg_erase_after_bad, __msg_valid_range2,
           __msg_local_iter_compare_bad, __msg_non_empty_range,
           __msg_self_move_assign, __msg_bucket_index_oob,
           __msg_valid_load_factor, __msg_equal_allocs,
           __msg_insert_range_from_self, __msg_irreflexive_ordering }

       enum _Distance_precision { __dp_none, __dp_equality, __dp_sign,
           __dp_sign_max_size, __dp_exact }

πŸ› οΈ Functions πŸ› οΈ

okay bestie, so this is the part where we list all the internal helper functions. no cap, there are a LOT. each one is a little template darling. let's go. πŸ’…


  • __base β€” first up, this overload. signature:
     template<typename _Iterator> constexpr _Iterator __base (_Iterator __it)
  • __base β€” another one, with _Safe_iterator and std::random_access_iterator_tag. signature:
     template<typename _Iterator, typename _Sequence> constexpr _Iterator
         __base (const _Safe_iterator< _Iterator, _Sequence,
         std::random_access_iterator_tag > &__it)
  • __base β€” this one is giving move_iterator energy. signature:
     template<typename _Iterator> constexpr auto __base (const
         std::move_iterator< _Iterator > &__it) ->
         decltype(std::make_move_iterator(__base(__it.base())))
  • __base β€” reverse_iterator with a _Safe_iterator inside? iconic. signature:
     template<typename _Iterator, typename _Sequence> constexpr
         std::reverse_iterator< _Iterator > __base (const
         std::reverse_iterator< _Safe_iterator< _Iterator, _Sequence,
         std::random_access_iterator_tag > > &__it)
  • __can_advance β€” simple input iterator and size. signature:
     template<typename _InputIterator, typename _Size> constexpr bool
         __can_advance (_InputIterator, _Size)
  • __can_advance β€” now with a std::pair and int. signature:
     template<typename _InputIterator, typename _Diff> constexpr bool
         __can_advance (_InputIterator, const std::pair< _Diff,
         _Distance_precision > &, int)
  • __can_advance β€” _Safe_iterator version with size. signature:
     template<typename _Iterator, typename _Sequence, typename _Category,
         typename _Size> constexpr bool __can_advance (const _Safe_iterator<
         _Iterator, _Sequence, _Category > &, _Size)
  • __can_advance β€” _Safe_iterator with pair and int. signature:
     template<typename _Iterator, typename _Sequence, typename _Category,
         typename _Diff> constexpr bool __can_advance (const _Safe_iterator<
         _Iterator, _Sequence, _Category > &, const std::pair< _Diff,
         _Distance_precision > &, int)
  • __can_advance β€” move_iterator with size. signature:
     template<typename _Iterator, typename _Size> constexpr bool
         __can_advance (const std::move_iterator< _Iterator > &__it, _Size
         __n)
  • __can_advance β€” move_iterator with pair and int. signature:
     template<typename _Iterator, typename _Diff> constexpr bool
         __can_advance (const std::move_iterator< _Iterator > &__it, const
         std::pair< _Diff, _Distance_precision > &__dist, int __way)
  • __can_advance β€” reverse_iterator with size. signature:
     template<typename _Iterator, typename _Size> constexpr bool
         __can_advance (const std::reverse_iterator< _Iterator > &__it, _Size
         __n)
  • __can_advance β€” reverse_iterator with pair and int. signature:
     template<typename _Iterator, typename _Diff> constexpr bool
         __can_advance (const std::reverse_iterator< _Iterator > &__it, const
         std::pair< _Diff, _Distance_precision > &__dist, int __way)
  • __check_partitioned_lower β€” forward iterators and a value. signature:
     template<typename _ForwardIterator, typename _Tp> constexpr bool
         __check_partitioned_lower (_ForwardIterator __first,
         _ForwardIterator __last, const _Tp &__value)
  • __check_partitioned_lower β€” now with a predicate. signature:
     template<typename _ForwardIterator, typename _Tp, typename _Pred>
         constexpr bool __check_partitioned_lower (_ForwardIterator __first,
         _ForwardIterator __last, const _Tp &__value, _Pred __pred)
  • __check_partitioned_upper β€” forward iterators and a value. signature:
     template<typename _ForwardIterator, typename _Tp> constexpr bool
         __check_partitioned_upper (_ForwardIterator __first,
         _ForwardIterator __last, const _Tp &__value)
  • __check_partitioned_upper β€” now with a predicate. signature:
     template<typename _ForwardIterator, typename _Tp, typename _Pred>
         constexpr bool __check_partitioned_upper (_ForwardIterator __first,
         _ForwardIterator __last, const _Tp &__value, _Pred __pred)
  • __check_singular β€” iterator const ref. signature:
     template<typename _Iterator> constexpr bool __check_singular (_Iterator
         const &)
  • __check_singular β€” pointer const ref. signature:
     template<typename _Tp> constexpr bool __check_singular (_Tp *const
         &__ptr)
  • __check_singular_aux β€” takes a _Safe_iterator_base pointer. signature:
     bool __check_singular_aux (const _Safe_iterator_base *__x)
  • __check_singular_aux β€” takes a class _Safe_iterator_base pointer. signature:
     bool __check_singular_aux (const class _Safe_iterator_base *)
  • __check_singular_aux β€” takes a const void pointer. signature:
     bool __check_singular_aux (const void *)
  • __check_sorted β€” input iterators only. signature:
     template<typename _InputIterator> constexpr bool __check_sorted (const
         _InputIterator &__first, const _InputIterator &__last)
  • __check_sorted β€” with a predicate. signature:
     template<typename _InputIterator, typename _Predicate> constexpr bool
         __check_sorted (const _InputIterator &__first, const _InputIterator
         &__last, _Predicate __pred)
  • __check_sorted_aux β€” forward iterator, predicate, forward_iterator_tag. signature:
     template<typename _ForwardIterator, typename _Predicate> constexpr bool
         __check_sorted_aux (_ForwardIterator __first, _ForwardIterator
         __last, _Predicate __pred, std::forward_iterator_tag)
  • __check_sorted_aux β€” forward iterator, forward_iterator_tag. signature:
     template<typename _ForwardIterator> constexpr bool __check_sorted_aux
         (_ForwardIterator __first, _ForwardIterator __last,
         std::forward_iterator_tag)
  • __check_sorted_aux β€” input iterator, predicate, input_iterator_tag. signature:
     template<typename _InputIterator, typename _Predicate> constexpr bool
         __check_sorted_aux (const _InputIterator &, const _InputIterator &,
         _Predicate, std::input_iterator_tag)
  • __check_sorted_aux β€” input iterator, input_iterator_tag. signature:
     template<typename _InputIterator> constexpr bool __check_sorted_aux
         (const _InputIterator &, const _InputIterator &,
         std::input_iterator_tag)
  • __check_sorted_set β€” two input iterators. signature:
     template<typename _InputIterator1, typename _InputIterator2> constexpr
         bool __check_sorted_set (const _InputIterator1 &__first, const
         _InputIterator1 &__last, const _InputIterator2 &)
  • __check_sorted_set β€” with a predicate. signature:
     template<typename _InputIterator1, typename _InputIterator2, typename
         _Predicate> constexpr bool __check_sorted_set (const _InputIterator1
         &__first, const _InputIterator1 &__last, const _InputIterator2 &,
         _Predicate __pred)
  • __check_sorted_set_aux β€” predicate, std::__false_type. signature:
     template<typename _InputIterator, typename _Predicate> constexpr bool
         __check_sorted_set_aux (const _InputIterator &, const _InputIterator
         &, _Predicate, std::__false_type)
  • __check_sorted_set_aux β€” std::__false_type. signature:
     template<typename _InputIterator> constexpr bool __check_sorted_set_aux
         (const _InputIterator &, const _InputIterator &, std::__false_type)
  • __check_sorted_set_aux β€” predicate, std::__true_type. signature:
     template<typename _InputIterator, typename _Predicate> constexpr bool
         __check_sorted_set_aux (const _InputIterator &__first, const
         _InputIterator &__last, _Predicate __pred, std::__true_type)
  • __check_sorted_set_aux β€” std::__true_type. signature:
     template<typename _InputIterator> constexpr bool __check_sorted_set_aux
         (const _InputIterator &__first, const _InputIterator &__last,
         std::__true_type)
  • __check_string β€” char type, integer, file, line, function. signature:
     template<typename _CharT, typename _Integer> const _CharT *
         __check_string (const _CharT *__s, _Integer __n, const char *__file,
         unsigned int __line, const char *__function)
  • __check_string β€” char type, file, line, function. signature:
     template<typename _CharT> const _CharT * __check_string (const _CharT
         *__s, const char *__file, unsigned int __line, const char
         *__function)
  • __check_valid_range β€” input iterators, file, line, function. signature:
     template<typename _InputIterator> constexpr _InputIterator
         __check_valid_range (const _InputIterator &__first, const
         _InputIterator &__last, const char *__file, unsigned int __line,
         const char *__function)
  • __foreign_iterator β€” safe iterator, other begin, other end. signature:
     template<typename _Iterator, typename _Sequence, typename _Category,
         typename _InputIterator> bool __foreign_iterator (const
         _Safe_iterator< _Iterator, _Sequence, _Category > &__it,
         _InputIterator __other, _InputIterator __other_end)
  • __foreign_iterator_aux2 β€” two safe iterators of different sequences. signature:
     template<typename _Iterator, typename _Sequence, typename _Category,
         typename _OtherIterator, typename _OtherSequence, typename
         _OtherCategory> bool __foreign_iterator_aux2 (const _Safe_iterator<
         _Iterator, _Sequence, _Category > &, const _Safe_iterator<
         _OtherIterator, _OtherSequence, _OtherCategory > &, const
         _Safe_iterator< _OtherIterator, _OtherSequence, _OtherCategory > &)
  • __foreign_iterator_aux2 β€” safe iterator and input iterator range. signature:
     template<typename _Iterator, typename _Sequence, typename _Category,
         typename _InputIterator> bool __foreign_iterator_aux2 (const
         _Safe_iterator< _Iterator, _Sequence, _Category > &__it, const
         _InputIterator &__other, const _InputIterator &__other_end)
  • __foreign_iterator_aux2 β€” safe iterator and other safe iterator same sequence. signature:
     template<typename _Iterator, typename _Sequence, typename _Category,
         typename _OtherIterator> bool __foreign_iterator_aux2 (const
         _Safe_iterator< _Iterator, _Sequence, _Category > &__it, const
         _Safe_iterator< _OtherIterator, _Sequence, _Category > &__other,
         const _Safe_iterator< _OtherIterator, _Sequence, _Category > &)
  • __foreign_iterator_aux3 β€” std::__false_type. signature:
     template<typename _Iterator, typename _Sequence, typename _Category,
         typename _InputIterator> bool __foreign_iterator_aux3 (const
         _Safe_iterator< _Iterator, _Sequence, _Category > &, const
         _InputIterator &, const _InputIterator &, std::__false_type)
  • __foreign_iterator_aux3 β€” std::__true_type. signature:
     template<typename _Iterator, typename _Sequence, typename _Category,
         typename _InputIterator> bool __foreign_iterator_aux3 (const
         _Safe_iterator< _Iterator, _Sequence, _Category > &__it, const
         _InputIterator &__other, const _InputIterator &__other_end,
         std::__true_type)
  • __foreign_iterator_aux4 β€” variadic. signature:
     template<typename _Iterator, typename _Sequence, typename _Category>
         bool __foreign_iterator_aux4 (const _Safe_iterator< _Iterator,
         _Sequence, _Category > &,...)
  • __foreign_iterator_aux4 β€” value type pointer. signature:
     template<typename _Iterator, typename _Sequence, typename _Category>
         bool __foreign_iterator_aux4 (const _Safe_iterator< _Iterator,
         _Sequence, _Category > &__it, const typename _Sequence::value_type
         *__other)
  • __get_distance β€” two iterators. signature:
     template<typename _Iterator> constexpr _Distance_traits< _Iterator
         >::__type __get_distance (_Iterator __lhs, _Iterator __rhs)
  • __get_distance β€” with std::input_iterator_tag. signature:
     template<typename _Iterator> constexpr _Distance_traits< _Iterator
         >::__type __get_distance (_Iterator __lhs, _Iterator __rhs,
         std::input_iterator_tag)
  • __get_distance β€” with std::random_access_iterator_tag. signature:
     template<typename _Iterator> constexpr _Distance_traits< _Iterator
         >::__type __get_distance (_Iterator __lhs, _Iterator __rhs,
         std::random_access_iterator_tag)
  • __get_distance β€” move_iterator version. signature:
     template<typename _Iterator> constexpr _Distance_traits< _Iterator
         >::__type __get_distance (const std::move_iterator< _Iterator >
         &__first, const std::move_iterator< _Iterator > &__last)
  • __get_distance β€” reverse_iterator version. signature:
     template<typename _Iterator> constexpr _Distance_traits< _Iterator
         >::__type __get_distance (const std::reverse_iterator< _Iterator >
         &__first, const std::reverse_iterator< _Iterator > &__last)
  • __is_irreflexive β€” one iterator. signature:
     template<typename _Iterator> constexpr bool __is_irreflexive (_Iterator
         __it)
  • __is_irreflexive_pred β€” iterator and predicate. signature:
     template<typename _Iterator, typename _Pred> constexpr bool
         __is_irreflexive_pred (_Iterator __it, _Pred __pred)
  • __unsafe β€” plain iterator. signature:
     template<typename _Iterator> constexpr _Iterator __unsafe (_Iterator
         __it)
  • __unsafe β€” _Safe_iterator version. signature:
     template<typename _Iterator, typename _Sequence> _Iterator __unsafe
         (const _Safe_iterator< _Iterator, _Sequence > &__it)
  • __unsafe β€” _Safe_local_iterator version. signature:
     template<typename _Iterator, typename _UContainer> _Iterator __unsafe
         (const _Safe_local_iterator< _Iterator, _UContainer > &__it)
  • __unsafe β€” move_iterator version. signature:
     template<typename _Iterator> constexpr auto __unsafe (const
         std::move_iterator< _Iterator > &__it) ->
         decltype(std::make_move_iterator(__unsafe(__it.base())))
  • __unsafe β€” reverse_iterator version. signature:
     template<typename _Iterator> constexpr auto __unsafe (const
         std::reverse_iterator< _Iterator > &__it) ->
         decltype(std::__make_reverse_iterator(__unsafe(__it.base())))
  • __valid_range β€” two input iterators. signature:
     template<typename _InputIterator> constexpr bool __valid_range
         (_InputIterator __first, _InputIterator __last)
  • __valid_range β€” two input iterators plus distance. signature:
     template<typename _InputIterator> constexpr bool __valid_range
         (_InputIterator __first, _InputIterator __last, typename
         _Distance_traits< _InputIterator >::__type &__dist)
  • __valid_range β€” two safe iterators. signature:
     template<typename _Iterator, typename _Sequence, typename _Category>
         constexpr bool __valid_range (const _Safe_iterator< _Iterator,
         _Sequence, _Category > &, const _Safe_iterator< _Iterator,
         _Sequence, _Category > &)
  • __valid_range β€” two safe iterators plus distance. signature:
     template<typename _Iterator, typename _Sequence, typename _Category>
         constexpr bool __valid_range (const _Safe_iterator< _Iterator,
         _Sequence, _Category > &, const _Safe_iterator< _Iterator,
         _Sequence, _Category > &, typename _Distance_traits< _Iterator
         >::__type &)
  • __valid_range β€” two safe local iterators. signature:
     template<typename _Iterator, typename _Sequence> bool __valid_range
         (const _Safe_local_iterator< _Iterator, _Sequence > &, const
         _Safe_local_iterator< _Iterator, _Sequence > &)
  • __valid_range β€” and the last one, cut off in the original, bestie. signature:
     template<typename _Iterator, typename _Sequence> bool __valid_range

okay so we're literally resuming mid-declaration 😭 the last signature got chopped and this is its tail β€” then every single remaining decl in the list, verbatim, no edits, no notes, no cap:

(const _Safe_local_iterator< _Iterator, _Sequence > &, const _Safe_local_iterator< _Iterator, _Sequence > &, typename _Distance_traits< _Iterator >::__type &)
template<typename _Iterator, typename _UContainer> bool __valid_range (const _Safe_local_iterator< _Iterator, _UContainer > &__first, const _Safe_local_iterator< _Iterator, _UContainer > &__last)
template<typename _Iterator, typename _UContainer> bool __valid_range (const _Safe_local_iterator< _Iterator, _UContainer > &__first, const _Safe_local_iterator< _Iterator, _UContainer > &__last, typename _Distance_traits< _Iterator >::__type &__dist_info)
template<typename _Iterator> constexpr bool __valid_range (const std::move_iterator< _Iterator > &__first, const std::move_iterator< _Iterator > &__last, typename _Distance_traits< _Iterator >::__type &__dist)
template<typename _Iterator> constexpr bool __valid_range (const std::reverse_iterator< _Iterator > &__first, const std::reverse_iterator< _Iterator > &__last, typename _Distance_traits< _Iterator >::__type &__dist)
template<typename _InputIterator> constexpr bool __valid_range_aux (_InputIterator __first, _InputIterator __last, std::input_iterator_tag)
template<typename _InputIterator> constexpr bool __valid_range_aux (_InputIterator __first, _InputIterator __last, std::random_access_iterator_tag)
template<typename _CharT, typename _Traits, typename _Allocator> std::basic_istream< _CharT, _Traits > & getline (std::basic_istream< _CharT, _Traits > &__is, basic_string< _CharT, _Traits, _Allocator > &__str)
template<typename _CharT, typename _Traits, typename _Allocator> std::basic_istream< _CharT, _Traits > & getline (std::basic_istream< _CharT, _Traits > &__is, basic_string< _CharT, _Traits, _Allocator > &__str, _CharT __delim)
template<typename _CharT, typename _Traits, typename _Allocator> bool operator!= (const _CharT *__lhs, const basic_string< _CharT, _Traits, _Allocator > &__rhs)
template<typename _CharT, typename _Traits, typename _Allocator> bool operator!= (const basic_string< _CharT, _Traits, _Allocator > &__lhs, const _CharT *__rhs)
template<typename _CharT, typename _Traits, typename _Allocator> bool operator!= (const basic_string< _CharT, _Traits, _Allocator > &__lhs, const basic_string< _CharT, _Traits, _Allocator > &__rhs)
template<typename _CharT, typename _Traits, typename _Allocator> basic_string< _CharT, _Traits, _Allocator > operator+ (_CharT __lhs, const basic_string< _CharT, _Traits, _Allocator > &__rhs)
template<typename _CharT, typename _Traits, typename _Allocator> basic_string< _CharT, _Traits, _Allocator > operator+ (const _CharT *__lhs, const basic_string< _CharT, _Traits, _Allocator > &__rhs)
template<typename _CharT, typename _Traits, typename _Allocator> basic_string< _CharT, _Traits, _Allocator > operator+ (const basic_string< _CharT, _Traits, _Allocator > &__lhs, _CharT __rhs)
template<typename _CharT, typename _Traits, typename _Allocator> basic_string< _CharT, _Traits, _Allocator > operator+ (const basic_string< _CharT, _Traits, _Allocator > &__lhs, const _CharT *__rhs)
template<typename _CharT, typename _Traits, typename _Allocator> basic_string< _CharT, _Traits, _Allocator > operator+ (const basic_string< _CharT, _Traits, _Allocator > &__lhs, const basic_string< _CharT, _Traits, _Allocator > &__rhs)
template<typename _CharT, typename _Traits, typename _Allocator> bool operator< (const _CharT *__lhs, const basic_string< _CharT, _Traits, _Allocator > &__rhs)
template<typename _CharT, typename _Traits, typename _Allocator> bool operator< (const basic_string< _CharT, _Traits, _Allocator > &__lhs, const _CharT *__rhs)
template<typename _CharT, typename _Traits, typename _Allocator> bool operator< (const basic_string< _CharT, _Traits, _Allocator > &__lhs, const basic_string< _CharT, _Traits, _Allocator > &__rhs)
template<typename _CharT, typename _Traits, typename _Allocator> std::basic_ostream< _CharT, _Traits > & operator<< (std::basic_ostream< _CharT, _Traits > &__os, const basic_string< _CharT, _Traits, _Allocator > &__str)
template<typename _CharT, typename _Traits, typename _Allocator> bool operator<= (const _CharT *__lhs, const basic_string< _CharT, _Traits, _Allocator > &__rhs)
template<typename _CharT, typename _Traits, typename _Allocator> bool operator<= (const basic_string< _CharT, _Traits, _Allocator > &__lhs, const _CharT *__rhs)
template<typename _CharT, typename _Traits, typename _Allocator> bool operator<= (const basic_string< _CharT, _Traits, _Allocator > &__lhs, const basic_string< _CharT, _Traits, _Allocator > &__rhs)
template<typename _CharT, typename _Traits, typename _Allocator> bool operator== (const _CharT *__lhs, const basic_string< _CharT, _Traits, _Allocator > &__rhs)
template<typename _CharT, typename _Traits, typename _Allocator> bool operator== (const basic_string< _CharT, _Traits, _Allocator > &__lhs, const _CharT *__rhs)
template<typename _CharT, typename _Traits, typename _Allocator> bool operator== (const basic_string< _CharT, _Traits, _Allocator > &__lhs, const basic_string< _CharT, _Traits, _Allocator > &__rhs)
template<typename _CharT, typename _Traits, typename _Allocator> bool operator> (const _CharT *__lhs, const basic_string< _CharT, _Traits, _Allocator > &__rhs)
template<typename _CharT, typename _Traits, typename _Allocator> bool operator> (const basic_string< _CharT, _Traits, _Allocator > &__lhs, const _CharT *__rhs)
template<typename _CharT, typename _Traits, typename _Allocator> bool operator> (const basic_string< _CharT, _Traits, _Allocator > &__lhs, const basic_string< _CharT, _Traits, _Allocator > &__rhs)
template<typename _CharT, typename _Traits, typename _Allocator> bool operator>= (const _CharT *__lhs, const basic_string< _CharT, _Traits, _Allocator > &__rhs)
template<typename _CharT, typename _Traits, typename _Allocator> bool operator>= (const basic_string< _CharT, _Traits, _Allocator > &__lhs, const _CharT *__rhs)
template<typename _CharT, typename _Traits, typename _Allocator> bool operator>= (const basic_string< _CharT, _Traits, _Allocator > &__lhs, const basic_string< _CharT, _Traits, _Allocator > &__rhs)
template<typename _CharT, typename _Traits, typename _Allocator> std::basic_istream< _CharT, _Traits > & operator>> (std::basic_istream< _CharT, _Traits > &__is, basic_string< _CharT, _Traits, _Allocator > &__str)
template<typename _CharT, typename _Traits, typename _Allocator> void swap (basic_string< _CharT, _Traits, _Allocator > &__lhs, basic_string< _CharT, _Traits, _Allocator > &__rhs)

and that's the whole list, we ate ✨


πŸ’– Detailed Description πŸ’–

GNU debug classes for public use. that's literally the entire summary bestie, no notes πŸ’…


πŸŽ€ Typedef Documentation πŸŽ€

  • typedef basic_string<char16_t> __gnu_debug::u16string β€” a string of char16_t. yes, it's giving exactly what it says on the tin 🌸
  • typedef basic_string<char32_t> __gnu_debug::u32string β€” a string of char32_t. same energy, bigger chars πŸ¦‹

πŸ¦‹ Enumeration Type Documentation πŸ¦‹

  • enum __gnu_debug::_Distance_precision β€” the precision you're able to calculate the distance between two iterators with. that's the whole vibe πŸ”₯

πŸ‘‘ Function Documentation πŸ‘‘

⭐ __base ⭐

template<typename _Iterator> _Iterator __gnu_debug::__base (_Iterator __it)
  • [inline], [constexpr]

okay so this is a lil helper that pulls the base iterator out of a random access safe iterator, and the whole reason it exists is to keep debug mode from tanking your performance. it's only for random access iterators tho, because that's literally the only iterator category where you can actually check the iterators' order inside the __valid_range function β€” and you get to do that thanks to the < operator. iykyk πŸ’…

Referenced by __gnu_debug::_Safe_iterator< _Base_iterator, map >::_M_before_dereferenceable().


⭐ __check_singular ⭐

template<typename _Tp> bool __gnu_debug::__check_singular (_Tp *const & __ptr)
  • [inline], [constexpr]

non-NULL pointers are nonsingular. that's the rule, periodt 🫢


⭐ __check_singular_aux ⭐

bool __gnu_debug::__check_singular_aux (const _Safe_iterator_base * __x)
  • [inline]

iterators that derive from _Safe_iterator_base can be figured out as singular or non-singular. detective work but make it template πŸ’€

References __gnu_debug::_Safe_iterator_base::_M_singular().


⭐ __check_string (the one with a length) ⭐

template<typename _CharT, typename _Integer> const _CharT * __gnu_debug::__check_string (const _CharT * __s, _Integer __n, const char * __file, unsigned int __line, const char * __function)
  • [inline]

checks that __s is non-NULL or __n == 0, and then hands you back __s. like a bouncer at the door but for pointers πŸŽ€


⭐ __check_string (the one without a length) ⭐

template<typename _CharT> const _CharT * __gnu_debug::__check_string (const _CharT * __s, const char * __file, unsigned int __line, const char * __function)
  • [inline]

checks that __s is non-NULL, and then returns __s. short, sweet, iconic ✨


⭐ __foreign_iterator_aux2 (different container types) ⭐

template<typename _Iterator, typename _Sequence, typename _Category, typename _OtherIterator, typename _OtherSequence, typename _OtherCategory> bool __gnu_debug::__foreign_iterator_aux2 (const _Safe_iterator< _Iterator, _Sequence, _Category > & , const _Safe_iterator< _OtherIterator, _OtherSequence, _OtherCategory > & , const _Safe_iterator< _OtherIterator, _OtherSequence, _OtherCategory > & )
  • [inline]

handles debug iterators that come from different types of container. cross-container situations, we love to see it 🌈


⭐ __foreign_iterator_aux2 (same container type) ⭐

template<typename _Iterator, typename _Sequence, typename _Category, typename _OtherIterator> bool __gnu_debug::__foreign_iterator_aux2 (const _Safe_iterator< _Iterator, _Sequence, _Category > & __it, const _Safe_iterator< _OtherIterator, _Sequence, _Category > & __other, const _Safe_iterator< _OtherIterator, _Sequence, _Category > & )
  • [inline]

handles debug iterators coming from the same type of container. same container, different iterator, we vibe πŸ’œ


⭐ __get_distance ⭐

template<typename _Iterator> _Distance_traits< _Iterator >::__type __gnu_debug::__get_distance (_Iterator __lhs, _Iterator __rhs, std::random_access_iterator_tag )
  • [inline], [constexpr]

figures out the distance between two iterators, with some known precision. no guessing games, just known precision energy 🌸

References std::make_pair().


⭐ __valid_range (safe iterators) ⭐

template<typename _Iterator, typename _Sequence, typename _Category> bool __gnu_debug::__valid_range (const _Safe_iterator< _Iterator, _Sequence, _Category > & __first, const _Safe_iterator< _Iterator, _Sequence, _Category > & __last, typename _Distance_traits< _Iterator >::__type & __dist)
  • [inline], [constexpr]

safe iterators know how to check whether they form a valid range. they're self-aware, honestly πŸ’…


⭐ __valid_range (safe local iterators) ⭐

template<typename _Iterator, typename _UContainer> bool __gnu_debug::__valid_range (const _Safe_local_iterator< _Iterator, _UContainer > & __first, const _Safe_local_iterator< _Iterator, _UContainer > & __last, typename _Distance_traits< _Iterator >::__type & __dist_info)
  • [inline]

safe local iterators also know how to check whether they form a valid range. local edition, same self-awareness πŸŽ€


🫢 Author 🫢

this whole page was generated automatically by Doxygen for libstdc++ from the source code β€” nobody hand-wrote it, it just spawned like that, main character energy πŸ’…


okay that's the whole page bestie, we made it 😭 the footer's got libstdc++ and the page name __gnu_debug(3) on it, dated whenever Doxygen last ran its little build, and that's your source + version + date situation. mwah πŸ’‹πŸ’–

πŸ“¦ 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
  • centos-stream 10: gcc-toolset-16-libstdc++-docs 16.2.1-1.3.el10 Β· 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.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