std::__debug(3)
π NAME π
std::__debug β GNU debug code that swaps out standard behavior for debug behavior, bestie. fr fr it's the glow-up your containers get when you flip on debug mode.
β¨ SYNOPSIS β¨
π Classes π
Okay so listen, this is the whole roster of standard library classes that get the debug treatment β each one is literally the same class you already know and love, just with extra safety/checking/debug instrumentation strapped on top like a cute lil security detail. ngl it's giving bodyguard energy.
class bitsetβ Classstd::bitsetbut with additional safety/checking/debug instrumentation. πclass dequeβ Classstd::dequewith safety/checking/debug instrumentation. double-ended and double-checked.class forward_listβ Classstd::forward_listwith safety/checking/debug instrumentation. only goes forward but never skips the vibe check.class listβ Classstd::listwith safety/checking/debug instrumentation. π¦class mapβ Classstd::mapwith safety/checking/debug instrumentation. keyed, sorted, and supervised.class multimapβ Classstd::multimapwith safety/checking/debug instrumentation. same energy, but duplicates are welcome.class multisetβ Classstd::multisetwith safety/checking/debug instrumentation. πΈclass setβ Classstd::setwith safety/checking/debug instrumentation. no dupes, no bugs, no drama.class unordered_mapβ Classstd::unordered_mapwith safety/checking/debug instrumentation. chaotic order, immaculate checking.class unordered_multimapβ Classstd::unordered_multimapwith safety/checking/debug instrumentation. chaotic order and duplicate keys, still fully checked.class unordered_multisetβ Classstd::unordered_multisetwith safety/checking/debug instrumentation. πclass unordered_setβ Classstd::unordered_setwith safety/checking/debug instrumentation. hashing, but make it safe.class vectorβ Classstd::vectorwith safety/checking/debug instrumentation. π₯ the main character of containers, now with a chaperone.
iykyk: every single one of these is the same standard class name you'd normally use β the debug version just comes with the safety/checking/debug instrumentation baked in. π«Ά
β¨ Functions β¨
okay bestie, so this part is literally just the function overloads and operators, and there are SO many. but we're gonna get through every single one together, no cap π
first up, the deque ones:
template<typename _InputIterator, typename _ValT = typename
iterator_traits<_InputIterator>::value_type, typename _Allocator =
allocator<_ValT>, typename = _RequireInputIter<_InputIterator>,
typename = _RequireAllocator<_Allocator>> deque (_InputIterator,
_InputIterator, _Allocator=_Allocator()) -> deque< _ValT, _Allocator
>
template<typename _Tp, typename _Allocator = allocator<_Tp>, typename =
_RequireAllocator<_Allocator>> deque (size_t, _Tp,
_Allocator=_Allocator()) -> deque< _Tp, _Allocator >
and now forward_list:
template<typename _InputIterator, typename _ValT = typename
iterator_traits<_InputIterator>::value_type, typename _Allocator =
allocator<_ValT>, typename = _RequireInputIter<_InputIterator>,
typename = _RequireAllocator<_Allocator>> forward_list
(_InputIterator, _InputIterator, _Allocator=_Allocator()) ->
forward_list< _ValT, _Allocator >
template<typename _Tp, typename _Allocator = allocator<_Tp>, typename =
_RequireAllocator<_Allocator>> forward_list (size_t, _Tp,
_Allocator=_Allocator()) -> forward_list< _Tp, _Allocator >
list time:
template<typename _InputIterator, typename _ValT = typename
iterator_traits<_InputIterator>::value_type, typename _Allocator =
allocator<_ValT>, typename = _RequireInputIter<_InputIterator>,
typename = _RequireAllocator<_Allocator>> list (_InputIterator,
_InputIterator, _Allocator=_Allocator()) -> list< _ValT, _Allocator
>
template<typename _Tp, typename _Allocator = allocator<_Tp>, typename =
_RequireAllocator<_Allocator>> list (size_t, _Tp,
_Allocator=_Allocator()) -> list< _Tp, _Allocator >
okay map is next and there's four of them:
template<typename _InputIterator, typename _Allocator, typename =
_RequireInputIter<_InputIterator>, typename =
_RequireAllocator<_Allocator>> map (_InputIterator, _InputIterator,
_Allocator) -> map< __iter_key_t< _InputIterator >, __iter_val_t<
_InputIterator >, less< __iter_key_t< _InputIterator > >, _Allocator
>
template<typename _InputIterator, typename _Compare =
less<__iter_key_t<_InputIterator>>, typename _Allocator =
allocator<__iter_to_alloc_t<_InputIterator>>, typename =
_RequireInputIter<_InputIterator>, typename =
_RequireNotAllocator<_Compare>, typename =
_RequireAllocator<_Allocator>> map (_InputIterator, _InputIterator,
_Compare=_Compare(), _Allocator=_Allocator()) -> map< __iter_key_t<
_InputIterator >, __iter_val_t< _InputIterator >, _Compare,
_Allocator >
template<typename _Key, typename _Tp, typename _Allocator, typename =
_RequireAllocator<_Allocator>> map (initializer_list< pair< _Key,
_Tp > >, _Allocator) -> map< _Key, _Tp, less< _Key >, _Allocator >
template<typename _Key, typename _Tp, typename _Compare = less<_Key>,
typename _Allocator = allocator<pair<const _Key, _Tp>>, typename =
_RequireNotAllocator<_Compare>, typename =
_RequireAllocator<_Allocator>> map (initializer_list< pair< _Key,
_Tp > >, _Compare=_Compare(), _Allocator=_Allocator()) -> map< _Key,
_Tp, _Compare, _Allocator >
and multimap also has four:
template<typename _InputIterator, typename _Allocator, typename =
_RequireInputIter<_InputIterator>, typename =
_RequireAllocator<_Allocator>> multimap (_InputIterator,
_InputIterator, _Allocator) -> multimap< __iter_key_t<
_InputIterator >, __iter_val_t< _InputIterator >, less<
__iter_key_t< _InputIterator > >, _Allocator >
template<typename _InputIterator, typename _Compare =
less<__iter_key_t<_InputIterator>>, typename _Allocator =
allocator<__iter_to_alloc_t<_InputIterator>>, typename =
_RequireInputIter<_InputIterator>, typename =
_RequireNotAllocator<_Compare>, typename =
_RequireAllocator<_Allocator>> multimap (_InputIterator,
_InputIterator, _Compare=_Compare(), _Allocator=_Allocator()) ->
multimap< __iter_key_t< _InputIterator >, __iter_val_t<
_InputIterator >, _Compare, _Allocator >
template<typename _Key, typename _Tp, typename _Allocator, typename =
_RequireAllocator<_Allocator>> multimap (initializer_list< pair<
_Key, _Tp > >, _Allocator) -> multimap< _Key, _Tp, less< _Key >,
_Allocator >
template<typename _Key, typename _Tp, typename _Compare = less<_Key>,
typename _Allocator = allocator<pair<const _Key, _Tp>>, typename =
_RequireNotAllocator<_Compare>, typename =
_RequireAllocator<_Allocator>> multimap (initializer_list< pair<
_Key, _Tp > >, _Compare=_Compare(), _Allocator=_Allocator()) ->
multimap< _Key, _Tp, _Compare, _Allocator >
multiset has four too:
template<typename _InputIterator, typename _Allocator, typename =
_RequireInputIter<_InputIterator>, typename =
_RequireAllocator<_Allocator>> multiset (_InputIterator,
_InputIterator, _Allocator) -> multiset< typename iterator_traits<
_InputIterator >::value_type, less< typename iterator_traits<
_InputIterator >::value_type >, _Allocator >
template<typename _InputIterator, typename _Compare = less<typename
iterator_traits<_InputIterator>::value_type>, typename _Allocator =
allocator<typename iterator_traits<_InputIterator>::value_type>,
typename = _RequireInputIter<_InputIterator>, typename =
_RequireNotAllocator<_Compare>, typename =
_RequireAllocator<_Allocator>> multiset (_InputIterator,
_InputIterator, _Compare=_Compare(), _Allocator=_Allocator()) ->
multiset< typename iterator_traits< _InputIterator >::value_type,
_Compare, _Allocator >
template<typename _Key, typename _Allocator, typename =
_RequireAllocator<_Allocator>> multiset (initializer_list< _Key >,
_Allocator) -> multiset< _Key, less< _Key >, _Allocator >
template<typename _Key, typename _Compare = less<_Key>, typename
_Allocator = allocator<_Key>, typename =
_RequireNotAllocator<_Compare>, typename =
_RequireAllocator<_Allocator>> multiset (initializer_list< _Key >,
_Compare=_Compare(), _Allocator=_Allocator()) -> multiset< _Key,
_Compare, _Allocator >
and now we're into operators! bitset ones first:
template<size_t _Nb> constexpr bitset< _Nb > operator& (const bitset<
_Nb > &__x, const bitset< _Nb > &__y) noexcept
template<typename _CharT, typename _Traits, size_t _Nb>
std::basic_ostream< _CharT, _Traits > & operator<<
(std::basic_ostream< _CharT, _Traits > &__os, const bitset< _Nb >
&__x)
then the spaceship operators <=> for all the containers:
template<typename _Tp, typename _Alloc> constexpr
__detail::__synth3way_t< _Tp > operator<=> (const deque< _Tp, _Alloc
> &__x, const deque< _Tp, _Alloc > &__y)
template<typename _Tp, typename _Alloc> constexpr
__detail::__synth3way_t< _Tp > operator<=> (const forward_list< _Tp,
_Alloc > &__x, const forward_list< _Tp, _Alloc > &__y)
template<typename _Tp, typename _Alloc> constexpr
__detail::__synth3way_t< _Tp > operator<=> (const list< _Tp, _Alloc
> &__x, const list< _Tp, _Alloc > &__y)
template<typename _Key, typename _Tp, typename _Compare, typename
_Alloc> __detail::__synth3way_t< pair< const _Key, _Tp > >
operator<=> (const map< _Key, _Tp, _Compare, _Alloc > &__lhs, const
map< _Key, _Tp, _Compare, _Alloc > &__rhs)
template<typename _Key, typename _Tp, typename _Compare, typename
_Alloc> __detail::__synth3way_t< pair< const _Key, _Tp > >
operator<=> (const multimap< _Key, _Tp, _Compare, _Alloc > &__lhs,
const multimap< _Key, _Tp, _Compare, _Alloc > &__rhs)
template<typename _Key, typename _Compare, typename _Alloc>
__detail::__synth3way_t< _Key > operator<=> (const multiset< _Key,
_Compare, _Alloc > &__lhs, const multiset< _Key, _Compare, _Alloc >
&__rhs)
template<typename _Key, typename _Compare, typename _Alloc>
__detail::__synth3way_t< _Key > operator<=> (const set< _Key,
_Compare, _Alloc > &__lhs, const set< _Key, _Compare, _Alloc >
&__rhs)
template<typename _Tp, typename _Alloc> constexpr
__detail::__synth3way_t< _Tp > operator<=> (const vector< _Tp,
_Alloc > &__x, const vector< _Tp, _Alloc > &__y)
then the == operators, and there's a whole bunch:
template<typename _Tp, typename _Alloc> bool operator== (const deque<
_Tp, _Alloc > &__lhs, const deque< _Tp, _Alloc > &__rhs)
template<typename _Tp, typename _Alloc> bool operator== (const
forward_list< _Tp, _Alloc > &__lx, const forward_list< _Tp, _Alloc >
&__ly)
template<typename _Tp, typename _Alloc> bool operator== (const list<
_Tp, _Alloc > &__lhs, const list< _Tp, _Alloc > &__rhs)
template<typename _Key, typename _Tp, typename _Compare, typename
_Allocator> bool operator== (const map< _Key, _Tp, _Compare,
_Allocator > &__lhs, const map< _Key, _Tp, _Compare, _Allocator >
&__rhs)
template<typename _Key, typename _Tp, typename _Compare, typename
_Allocator> bool operator== (const multimap< _Key, _Tp, _Compare,
_Allocator > &__lhs, const multimap< _Key, _Tp, _Compare, _Allocator
> &__rhs)
template<typename _Key, typename _Compare, typename _Allocator> bool
operator== (const multiset< _Key, _Compare, _Allocator > &__lhs,
const multiset< _Key, _Compare, _Allocator > &__rhs)
template<typename _Key, typename _Compare, typename _Allocator> bool
operator== (const set< _Key, _Compare, _Allocator > &__lhs, const
set< _Key, _Compare, _Allocator > &__rhs)
template<typename _Key, typename _Tp, typename _Hash, typename _Pred,
typename _Alloc> bool operator== (const unordered_map< _Key, _Tp,
_Hash, _Pred, _Alloc > &__x, const unordered_map< _Key, _Tp, _Hash,
_Pred, _Alloc > &__y)
template<typename _Key, typename _Tp, typename _Hash, typename _Pred,
typename _Alloc> bool operator== (const unordered_multimap< _Key,
_Tp, _Hash, _Pred, _Alloc > &__x, const unordered_multimap< _Key,
_Tp, _Hash, _Pred, _Alloc > &__y)
template<typename _Value, typename _Hash, typename _Pred, typename
_Alloc> bool operator== (const unordered_multiset< _Value, _Hash,
_Pred, _Alloc > &__x, const unordered_multiset< _Value, _Hash,
_Pred, _Alloc > &__y)
template<typename _Value, typename _Hash, typename _Pred, typename
_Alloc> bool operator== (const unordered_set< _Value, _Hash, _Pred,
_Alloc > &__x, const unordered_set< _Value, _Hash, _Pred, _Alloc >
&__y)
template<typename _Tp, typename _Alloc> constexpr bool operator== (const
vector< _Tp, _Alloc > &__lhs, const vector< _Tp, _Alloc > &__rhs)
and finally, the rest of the bitset operators and that last incomplete one:
template<typename _CharT, typename _Traits, size_t _Nb>
std::basic_istream< _CharT, _Traits > & operator>>
(std::basic_istream< _CharT, _Traits > &__is, bitset< _Nb > &__x)
template<size_t _Nb> constexpr bitset< _Nb > operator^ (const bitset<
_Nb > &__x, const bitset< _Nb > &__y) noexcept
template<size_t _Nb> constexpr bitset< _Nb > operator| (const bitset<
_Nb > &__x, const bitset< _Nb > &__y) noexcept
template<typename _InputIterator, typename _Allocator, typename =
_RequireInputIter<_InputIterator>, typename =
okay bestie, we're back and we are STILL in the deduction-guide trenches π
β the set guides refused to end, so here's the rest of them, then the great swap parade, then the unordered_* guides. Buckle up, hydrate, and keep your _RequireAllocator close π«Ά
template<typename _InputIterator, typename _Allocator, typename = _RequireInputIter<_InputIterator>, typename = _RequireAllocator<_Allocator>> set (_InputIterator, _InputIterator, _Allocator) -> set< typename iterator_traits< _InputIterator >::value_type, less< typename iterator_traits< _InputIterator >::value_type >, _Allocator >
That's the "give me an allocator and nothing else" version β the key type and comparator get figured out from the iterators, and the comparator is just less<β¦> because you didn't ask for anything fancier β¨
template<typename _InputIterator, typename _Compare = less<typename iterator_traits<_InputIterator>::value_type>, typename _Allocator = allocator<typename iterator_traits<_InputIterator>::value_type>, typename = _RequireInputIter<_InputIterator>, typename = _RequireNotAllocator<_Compare>, typename = _RequireAllocator<_Allocator>> set (_InputIterator, _InputIterator, _Compare=_Compare(), _Allocator=_Allocator()) -> set< typename iterator_traits< _InputIterator >::value_type, _Compare, _Allocator >
And the full-flex one: iterator pair + your own _Compare + your own _Allocator. Note the guards β _RequireNotAllocator<_Compare> so you can't accidentally pass an allocator where a comparator goes, and _RequireAllocator<_Allocator> to make sure the last arg really is an allocator. The library is literally holding your hand here, no cap π
template<typename _Key, typename _Allocator, typename = _RequireAllocator<_Allocator>> set (initializer_list< _Key >, _Allocator) -> set< _Key, less< _Key >, _Allocator >
Brace-list edition, allocator only β comparator defaults to less< _Key >, key type comes straight off the initializer_list π
template<typename _Key, typename _Compare = less<_Key>, typename _Allocator = allocator<_Key>, typename = _RequireNotAllocator<_Compare>, typename = _RequireAllocator<_Allocator>> set (initializer_list< _Key >, _Compare=_Compare(), _Allocator=_Allocator()) -> set< _Key, _Compare, _Allocator >
And the deluxe brace-list edition: _Key, _Compare, _Allocator, all deduced, defaults locked in. Slay πΈ
now. the swap girlies. Every container gets its own free-function swap, and the noexcept situation is a whole vibe β some are conditionally noexcept, some just forward to the member swap. Do not @ me, just read them π¦
template<typename _Tp, typename _Alloc> void swap (deque< _Tp, _Alloc > &__lhs, deque< _Tp, _Alloc > &__rhs) noexcept(/*conditional */)
template<typename _Tp, typename _Alloc> void swap (forward_list< _Tp, _Alloc > &__lx, forward_list< _Tp, _Alloc > &__ly) noexcept(noexcept(__lx.swap(__ly)))
See std::forward_list::swap().
template<typename _Tp, typename _Alloc> void swap (list< _Tp, _Alloc > &__lhs, list< _Tp, _Alloc > &__rhs) noexcept(/*conditional */)
template<typename _Key, typename _Tp, typename _Compare, typename _Allocator> void swap (map< _Key, _Tp, _Compare, _Allocator > &__lhs, map< _Key, _Tp, _Compare, _Allocator > &__rhs) noexcept(/*conditional */)
template<typename _Key, typename _Tp, typename _Compare, typename _Allocator> void swap (multimap< _Key, _Tp, _Compare, _Allocator > &__lhs, multimap< _Key, _Tp, _Compare, _Allocator > &__rhs) noexcept(/*conditional */)
template<typename _Key, typename _Compare, typename _Allocator> void swap (multiset< _Key, _Compare, _Allocator > &__x, multiset< _Key, _Compare, _Allocator > &__y) noexcept(/*conditional */)
template<typename _Key, typename _Compare, typename _Allocator> void swap (set< _Key, _Compare, _Allocator > &__x, set< _Key, _Compare, _Allocator > &__y) noexcept(/*conditional */)
template<typename _Key, typename _Tp, typename _Hash, typename _Pred, typename _Alloc> void swap (unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc > &__x, unordered_map< _Key, _Tp, _Hash, _Pred, _Alloc > &__y) noexcept(noexcept(__x.swap(__y)))
template<typename _Key, typename _Tp, typename _Hash, typename _Pred, typename _Alloc> void swap (unordered_multimap< _Key, _Tp, _Hash, _Pred, _Alloc > &__x, unordered_multimap< _Key, _Tp, _Hash, _Pred, _Alloc > &__y) noexcept(noexcept(__x.swap(__y)))
template<typename _Value, typename _Hash, typename _Pred, typename _Alloc> void swap (unordered_multiset< _Value, _Hash, _Pred, _Alloc > &__x, unordered_multiset< _Value, _Hash, _Pred, _Alloc > &__y) noexcept(noexcept(__x.swap(__y)))
template<typename _Value, typename _Hash, typename _Pred, typename _Alloc> void swap (unordered_set< _Value, _Hash, _Pred, _Alloc > &__x, unordered_set< _Value, _Hash, _Pred, _Alloc > &__y) noexcept(noexcept(__x.swap(__y)))
template<typename _Tp, typename _Alloc> constexpr void swap (vector< _Tp, _Alloc > &__lhs, vector< _Tp, _Alloc > &__rhs) noexcept(/*conditional */)
See how vector is the only one here marked constexpr? Main character energy, honestly π
and now, the unordered_map deduction guides β eight of them, because the committee said "what if we did every combination" and meant it π
template<typename _InputIterator, typename _Allocator, typename = _RequireInputIter<_InputIterator>, typename = _RequireAllocator<_Allocator>> unordered_map (_InputIterator, _InputIterator, _Allocator) -> unordered_map< __iter_key_t< _InputIterator >, __iter_val_t< _InputIterator >, hash< __iter_key_t< _InputIterator > >, equal_to< __iter_key_t< _InputIterator > >, _Allocator >
template<typename _InputIterator, typename _Allocator, typename = _RequireInputIter<_InputIterator>, typename = _RequireAllocator<_Allocator>> unordered_map (_InputIterator, _InputIterator, typename unordered_map< int, int >::size_type, _Allocator) -> unordered_map< __iter_key_t< _InputIterator >, __iter_val_t< _InputIterator >, hash< __iter_key_t< _InputIterator > >, equal_to< __iter_key_t< _InputIterator > >, _Allocator >
template<typename _InputIterator, typename _Hash, typename _Allocator, typename = _RequireInputIter<_InputIterator>, typename = _RequireNotAllocatorOrIntegral<_Hash>, typename = _RequireAllocator<_Allocator>> unordered_map (_InputIterator, _InputIterator, typename unordered_map< int, int >::size_type, _Hash, _Allocator) -> unordered_map< __iter_key_t< _InputIterator >, __iter_val_t< _InputIterator >, _Hash, equal_to< __iter_key_t< _InputIterator > >, _Allocator >
template<typename _InputIterator, typename _Hash = hash<__iter_key_t<_InputIterator>>, typename _Pred = equal_to<__iter_key_t<_InputIterator>>, typename _Allocator = allocator<__iter_to_alloc_t<_InputIterator>>, typename = _RequireInputIter<_InputIterator>, typename = _RequireNotAllocatorOrIntegral<_Hash>, typename = _RequireNotAllocator<_Pred>, typename = _RequireAllocator<_Allocator>> unordered_map (_InputIterator, _InputIterator, typename unordered_map< int, int >::size_type={}, _Hash=_Hash(), _Pred=_Pred(), _Allocator=_Allocator()) -> unordered_map< __iter_key_t< _InputIterator >, __iter_val_t< _InputIterator >, _Hash, _Pred, _Allocator >
template<typename _Key, typename _Tp, typename _Allocator, typename = _RequireAllocator<_Allocator>> unordered_map (initializer_list< pair< _Key, _Tp > >, _Allocator) -> unordered_map< _Key, _Tp, hash< _Key >, equal_to< _Key >, _Allocator >
template<typename _Key, typename _Tp, typename _Allocator, typename = _RequireAllocator<_Allocator>> unordered_map (initializer_list< pair< _Key, _Tp > >, typename unordered_map< int, int >::size_type, _Allocator) -> unordered_map< _Key, _Tp, hash< _Key >, equal_to< _Key >, _Allocator >
template<typename _Key, typename _Tp, typename _Hash, typename _Allocator, typename = _RequireNotAllocatorOrIntegral<_Hash>, typename = _RequireAllocator<_Allocator>> unordered_map (initializer_list< pair< _Key, _Tp > >, typename unordered_map< int, int >::size_type, _Hash, _Allocator) -> unordered_map< _Key, _Tp, _Hash, equal_to< _Key >, _Allocator >
template<typename _Key, typename _Tp, typename _Hash = hash<_Key>, typename _Pred = equal_to<_Key>, typename _Allocator = allocator<pair<const _Key, _Tp>>, typename = _RequireNotAllocatorOrIntegral<_Hash>, typename = _RequireNotAllocator<_Pred>, typename = _RequireAllocator<_Allocator>> unordered_map (initializer_list< pair< _Key, _Tp > >, typename unordered_map< int, int >::size_type={}, _Hash=_Hash(), _Pred=_Pred(), _Allocator=_Allocator()) -> unordered_map< _Key, _Tp, _Hash, _Pred, _Allocator >
Note the sneaky _RequireNotAllocatorOrIntegral<_Hash> guard β it stops the compiler from mistaking a size_type for a hash functor, because yes, that would absolutely happen otherwise, and yes, it would be a nightmare π
and the unordered_multimap guides, same energy, different container name β because the multi-version does not get to skip leg day π
template<typename _InputIterator, typename _Allocator, typename = _RequireInputIter<_InputIterator>, typename = _RequireAllocator<_Allocator>> unordered_multimap (_InputIterator, _InputIterator, _Allocator) -> unordered_multimap< __iter_key_t< _InputIterator >, __iter_val_t< _InputIterator >, hash< __iter_key_t< _InputIterator > >, equal_to< __iter_key_t< _InputIterator > >, _Allocator >
template<typename _InputIterator, typename _Allocator, typename = _RequireInputIter<_InputIterator>, typename = _RequireAllocator<_Allocator>> unordered_multimap (_InputIterator, _InputIterator, unordered_multimap< int, int >::size_type, _Allocator) -> unordered_multimap< __iter_key_t< _InputIterator >, __iter_val_t< _InputIterator >, hash< __iter_key_t< _InputIterator > >, equal_to< __iter_key_t< _InputIterator > >, _Allocator >
template<typename _InputIterator, typename _Hash, typename _Allocator, typename = _RequireInputIter<_InputIterator>, typename = _RequireNotAllocatorOrIntegral<_Hash>, typename = _RequireAllocator<_Allocator>> unordered_multimap (_InputIterator, _InputIterator, unordered_multimap< int, int >::size_type, _Hash, _Allocator) -> unordered_multimap< __iter_key_t< _InputIterator >, __iter_val_t< _InputIterator >, _Hash, equal_to< __iter_key_t< _InputIterator > >, _Allocator >
template<typename _InputIterator, typename _Hash = hash<__iter_key_t<_InputIterator>>, typename _Pred = equal_to<__iter_key_t<_InputIterator>>, typename _Allocator = allocator<__iter_to_alloc_t<_InputIterator>>, typename = _RequireInputIter<_InputIterator>, typename = _RequireNotAllocatorOrIntegral<_Hash>, typename = _RequireNotAllocator<_Pred>, typename = _RequireAllocator<_Allocator>> unordered_multimap (_InputIterator, _InputIterator, unordered_multimap< int, int >::size_type={}, _Hash=_Hash(), _Pred=_Pred(), _Allocator=_Allocator()) -> unordered_multimap< __iter_key_t< _InputIterator >, __iter_val_t< _InputIterator >, _Hash, _Pred, _Allocator >
template<typename _Key, typename _Tp, typename _Allocator, typename = _RequireAllocator<_Allocator>> unordered_multimap (initializer_list< pair< _Key, _Tp > >, _Allocator) -> unordered_multimap< _Key, _Tp, hash< _Key >, equal_to< _Key >, _Allocator >
template<typename _Key, typename _Tp, typename _Allocator, typename = _RequireAllocator<_Allocator>> unordered_multimap (initializer_list< pair< _Key, _Tp > >, unordered_multimap< int, int >::size_type, _Allocator) -> unordered_multimap< _Key, _Tp, hash< _Key >, equal_to< _Key >, _Allocator >
template<typename _Key, typename _Tp, typename _Hash, typename _Allocator, typename = _RequireNotAllocatorOrIntegral<_Hash>, typename = _RequireAllocator<_Allocator>> unordered_multimap (initializer_list< pair< _Key, _Tp > >, unordered_multimap< int, int >::size_type, _Hash, _Allocator) -> unordered_multimap< _Key, _Tp, _Hash, equal_to< _Key >, _Allocator >
template<typename _Key, typename _Tp, typename _Hash = hash<_Key>, typename _Pred = equal_to<_Key>, typename _Allocator = allocator<pair<const _Key, _Tp>>, typename = _RequireNotAllocatorOrIntegral<_Hash>, typename = _RequireNotAllocator<_Pred>, typename = _RequireAllocator<_Allocator>> unordered_multimap (initializer_list< pair< _Key, _Tp > >, unordered_multimap< int, int >::size_type={},
and bestie, that last one is where this page cuts off β the signature keeps going, so hold that thought and don't panic π we pick it right back up next part, fr fr π
okay so we're still deep in the deduction guides and they genuinely never stop coming β she's got stamina, I respect it. Picking up exactly where we left off, here's the lil tail of the one that got cut off mid-breath:
_Hash=_Hash(), _Pred=_Pred(), _Allocator=_Allocator()) ->
unordered_multimap< _Key, _Tp, _Hash, _Pred, _Allocator >
π unordered_multiset, the extended cinematic universe
three more of her, no crumbs:
template<typename _InputIterator, typename _Allocator, typename =
_RequireInputIter<_InputIterator>, typename =
_RequireAllocator<_Allocator>> unordered_multiset (_InputIterator,
_InputIterator, _Allocator) -> unordered_multiset< typename
iterator_traits< _InputIterator >::value_type, hash< typename
iterator_traits< _InputIterator >::value_type >, equal_to< typename
iterator_traits< _InputIterator >::value_type >, _Allocator >
template<typename _InputIterator, typename _Allocator, typename =
_RequireInputIter<_InputIterator>, typename =
_RequireAllocator<_Allocator>> unordered_multiset (_InputIterator,
_InputIterator, unordered_multiset< int >::size_type, _Allocator) ->
unordered_multiset< typename iterator_traits< _InputIterator
>::value_type, hash< typename iterator_traits< _InputIterator
>::value_type >, equal_to< typename iterator_traits< _InputIterator
>::value_type >, _Allocator >
template<typename _InputIterator, typename _Hash, typename _Allocator,
typename = _RequireInputIter<_InputIterator>, typename =
_RequireNotAllocatorOrIntegral<_Hash>, typename =
_RequireAllocator<_Allocator>> unordered_multiset (_InputIterator,
_InputIterator, unordered_multiset< int >::size_type, _Hash,
_Allocator) -> unordered_multiset< typename iterator_traits<
_InputIterator >::value_type, _Hash, equal_to< typename
iterator_traits< _InputIterator >::value_type >, _Allocator >
and then the big one, the full-glam default-everything version, _Hash, _Pred and _Allocator all pre-filled for you:
template<typename _InputIterator, typename _Hash = hash<typename
iterator_traits<_InputIterator>::value_type>, typename _Pred =
equal_to<typename iterator_traits<_InputIterator>::value_type>,
typename _Allocator = allocator<typename
iterator_traits<_InputIterator>::value_type>, typename =
_RequireInputIter<_InputIterator>, typename =
_RequireNotAllocatorOrIntegral<_Hash>, typename =
_RequireNotAllocator<_Pred>, typename =
_RequireAllocator<_Allocator>> unordered_multiset (_InputIterator,
_InputIterator, unordered_multiset< int >::size_type={},
_Hash=_Hash(), _Pred=_Pred(), _Allocator=_Allocator()) ->
unordered_multiset< typename iterator_traits< _InputIterator
>::value_type, _Hash, _Pred, _Allocator >
and the initializer_list girlies, four of them, brace-init besties rise up π:
template<typename _Tp, typename _Allocator, typename =
_RequireAllocator<_Allocator>> unordered_multiset (initializer_list<
_Tp >, _Allocator) -> unordered_multiset< _Tp, hash< _Tp >,
equal_to< _Tp >, _Allocator >
template<typename _Tp, typename _Allocator, typename =
_RequireAllocator<_Allocator>> unordered_multiset (initializer_list<
_Tp >, unordered_multiset< int >::size_type, _Allocator) ->
unordered_multiset< _Tp, hash< _Tp >, equal_to< _Tp >, _Allocator >
template<typename _Tp, typename _Hash, typename _Allocator, typename =
_RequireNotAllocatorOrIntegral<_Hash>, typename =
_RequireAllocator<_Allocator>> unordered_multiset (initializer_list<
_Tp >, unordered_multiset< int >::size_type, _Hash, _Allocator) ->
unordered_multiset< _Tp, _Hash, equal_to< _Tp >, _Allocator >
template<typename _Tp, typename _Hash = hash<_Tp>, typename _Pred =
equal_to<_Tp>, typename _Allocator = allocator<_Tp>, typename =
_RequireNotAllocatorOrIntegral<_Hash>, typename =
_RequireNotAllocator<_Pred>, typename =
_RequireAllocator<_Allocator>> unordered_multiset (initializer_list<
_Tp >, unordered_multiset< int >::size_type={}, _Hash=_Hash(),
_Pred=_Pred(), _Allocator=_Allocator()) -> unordered_multiset< _Tp,
_Hash, _Pred, _Allocator >
β¨ unordered_set enters the chat
same energy, one multi less. Watch her go:
template<typename _InputIterator, typename _Allocator, typename =
_RequireInputIter<_InputIterator>, typename =
_RequireAllocator<_Allocator>> unordered_set (_InputIterator,
_InputIterator, _Allocator) -> unordered_set< typename
iterator_traits< _InputIterator >::value_type, hash< typename
iterator_traits< _InputIterator >::value_type >, equal_to< typename
iterator_traits< _InputIterator >::value_type >, _Allocator >
template<typename _InputIterator, typename _Allocator, typename =
_RequireInputIter<_InputIterator>, typename =
_RequireAllocator<_Allocator>> unordered_set (_InputIterator,
_InputIterator, unordered_set< int >::size_type, _Allocator) ->
unordered_set< typename iterator_traits< _InputIterator
>::value_type, hash< typename iterator_traits< _InputIterator
>::value_type >, equal_to< typename iterator_traits< _InputIterator
>::value_type >, _Allocator >
template<typename _InputIterator, typename _Hash, typename _Allocator,
typename = _RequireInputIter<_InputIterator>, typename =
_RequireNotAllocatorOrIntegral<_Hash>, typename =
_RequireAllocator<_Allocator>> unordered_set (_InputIterator,
_InputIterator, unordered_set< int >::size_type, _Hash, _Allocator)
-> unordered_set< typename iterator_traits< _InputIterator
>::value_type, _Hash, equal_to< typename iterator_traits<
_InputIterator >::value_type >, _Allocator >
the defaults queen π:
template<typename _InputIterator, typename _Hash = hash<typename
iterator_traits<_InputIterator>::value_type>, typename _Pred =
equal_to<typename iterator_traits<_InputIterator>::value_type>,
typename _Allocator = allocator<typename
iterator_traits<_InputIterator>::value_type>, typename =
_RequireInputIter<_InputIterator>, typename =
_RequireNotAllocatorOrIntegral<_Hash>, typename =
_RequireNotAllocator<_Pred>, typename =
_RequireAllocator<_Allocator>> unordered_set (_InputIterator,
_InputIterator, unordered_set< int >::size_type={}, _Hash=_Hash(),
_Pred=_Pred(), _Allocator=_Allocator()) -> unordered_set< typename
iterator_traits< _InputIterator >::value_type, _Hash, _Pred,
_Allocator >
and her four initializer_list twins, matching set, head to toe π
:
template<typename _Tp, typename _Allocator, typename =
_RequireAllocator<_Allocator>> unordered_set (initializer_list< _Tp
>, _Allocator) -> unordered_set< _Tp, hash< _Tp >, equal_to< _Tp >,
_Allocator >
template<typename _Tp, typename _Allocator, typename =
_RequireAllocator<_Allocator>> unordered_set (initializer_list< _Tp
>, unordered_set< int >::size_type, _Allocator) -> unordered_set<
_Tp, hash< _Tp >, equal_to< _Tp >, _Allocator >
template<typename _Tp, typename _Hash, typename _Allocator, typename =
_RequireNotAllocatorOrIntegral<_Hash>, typename =
_RequireAllocator<_Allocator>> unordered_set (initializer_list< _Tp
>, unordered_set< int >::size_type, _Hash, _Allocator) ->
unordered_set< _Tp, _Hash, equal_to< _Tp >, _Allocator >
template<typename _Tp, typename _Hash = hash<_Tp>, typename _Pred =
equal_to<_Tp>, typename _Allocator = allocator<_Tp>, typename =
_RequireNotAllocatorOrIntegral<_Hash>, typename =
_RequireNotAllocator<_Pred>, typename =
_RequireAllocator<_Allocator>> unordered_set (initializer_list< _Tp
>, unordered_set< int >::size_type={}, _Hash=_Hash(), _Pred=_Pred(),
_Allocator=_Allocator()) -> unordered_set< _Tp, _Hash, _Pred,
_Allocator >
π and vector closes the whole thing out
the moment we've all been waiting for, two of her, and then we're DONE with the guides, I promise:
template<typename _InputIterator, typename _ValT = typename
iterator_traits<_InputIterator>::value_type, typename _Allocator =
allocator<_ValT>, typename = _RequireInputIter<_InputIterator>,
typename = _RequireAllocator<_Allocator>> vector (_InputIterator,
_InputIterator, _Allocator=_Allocator()) -> vector< _ValT,
_Allocator >
template<typename _Tp, typename _Allocator = allocator<_Tp>, typename =
_RequireAllocator<_Allocator>> vector (size_t, _Tp,
_Allocator=_Allocator()) -> vector< _Tp, _Allocator >
iconic. we ate. π
π«Ά DETAILED DESCRIPTION π«Ά
GNU debug code β she replaces standard behavior with debug behavior. That's the whole vibe. β¨
Macros and namespaces used by the implementation outside of debug wrappers to verify certain properties. The __glibcxx_requires_xxx macros are merely wrappers around the __glibcxx_check_xxx wrappers when we are compiling with debug mode, but they disappear when we are in release mode so that there is no checking performed in, e.g., the standard library algorithms.
fr fr, read that twice: debug mode = checks happen. Release mode = they ghost you completely. That's not a bug, that's the whole point. π
π FUNCTION DOCUMENTATION π
πΈ template<typename _Tp, typename _Alloc> void std::__debug::swap (forward_list< _Tp, _Alloc > & __lx, forward_list< _Tp, _Alloc > & __ly) [inline], [noexcept]
See std::forward_list::swap(). short, sweet, and she knows it.
π AUTHOR π
Generated automatically by Doxygen for libstdc++ from the source code. not me, not you, not a human β a robot did this and honestly? she understood the assignment. π€π
okay bestie that's a wrap on the whole page!! π Thank you for reading all four parts, you're a real one. This page ships under the libstdc++ banner as std::__debug(3), and there's a lil date stamp sitting down there in the footer with the version β that's just when she was built, no cap. go forth and debug responsibly, ily π¦π
π¦ 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