STD::SCOPED_ALLOCATOR_ADAPTOR(3cxx)

πŸ’… NAME πŸ’…

Ok bestie, welcome to the std::scoped_all... _InnerAllocs >(3cxx) page ✨. The main character is std::scoped_allocator_adaptor< _OuterAlloc, _InnerAllocs > β€” An adaptor to recursively pass an allocator to the objects it constructs. That’s the whole vibe: allocator recursion, but make it fashion πŸ’….


✨ SYNOPSIS ✨

First things first, the include:

#include <scoped_allocator>

And yes, it inherits _OuterAlloc. Slay.

πŸŽ€ Public Types πŸŽ€

These are the public types, bestie. I’m dropping them exactly so nothing gets scrambled:

typedef __traits::const_pointer const_pointer
typedef __traits::const_void_pointer const_void_pointer
typedef __traits::difference_type difference_type
typedef __inner_type::__type inner_allocator_type
typedef __and_< typename__traits::is_always_equal,
    typenameallocator_traits< _InnerAllocs >::is_always_equal... >::type
    is_always_equal
typedef _OuterAlloc outer_allocator_type
typedef __traits::pointer pointer
typedef __or_< typename__traits::propagate_on_container_copy_assignment,
    typenameallocator_traits< _InnerAllocs
    >::propagate_on_container_copy_assignment... >::type
    propagate_on_container_copy_assignment
typedef __or_< typename__traits::propagate_on_container_move_assignment,
    typenameallocator_traits< _InnerAllocs
    >::propagate_on_container_move_assignment... >::type
    propagate_on_container_move_assignment
typedef __or_< typename__traits::propagate_on_container_swap,
    typenameallocator_traits< _InnerAllocs
    >::propagate_on_container_swap... >::type
    propagate_on_container_swap
typedef __traits::size_type size_type
typedef __traits::value_type value_type
typedef __traits::void_pointer void_pointer

That’s a whole little ecosystem of typedefs, and every one is doing its job 🫢.

🫢 Public Member Functions 🫢

Now the member functions β€” constructors, allocators, construct/destroy, the whole clique. Exact list, no edits:

template<typename _Outer2 , typename  = _Constructible<_Outer2>>
    scoped_allocator_adaptor (_Outer2 &&__outer, const _InnerAllocs &...
    __inner) noexcept
scoped_allocator_adaptor (const scoped_allocator_adaptor &__other)
    noexcept
template<typename _Outer2 , typename  = _Constructible<const _Outer2&>>
    scoped_allocator_adaptor (const scoped_allocator_adaptor< _Outer2,
    _InnerAllocs... > &__other) noexcept
scoped_allocator_adaptor (scoped_allocator_adaptor &&__other) noexcept
template<typename _Outer2 , typename  = _Constructible<_Outer2>>
    scoped_allocator_adaptor (scoped_allocator_adaptor< _Outer2,
    _InnerAllocs... > &&__other) noexcept
pointer allocate (size_type __n)
pointer allocate (size_type __n, const_void_pointer __hint)
template<typename _Tp , typename... _Args> void construct (_Tp *__p,
    _Args &&... __args)
void deallocate (pointer __p, size_type __n) noexcept
template<typename _Tp > void destroy (_Tp *__p)
const inner_allocator_type & inner_allocator () const noexcept
inner_allocator_type & inner_allocator () noexcept
size_type max_size () const
scoped_allocator_adaptor & operator= (const scoped_allocator_adaptor
    &)=default
scoped_allocator_adaptor & operator= (scoped_allocator_adaptor
    &&)=default
const outer_allocator_type & outer_allocator () const noexcept
outer_allocator_type & outer_allocator () noexcept
scoped_allocator_adaptor select_on_container_copy_construction () const

Look at all those functions. It’s giving β€œallocator adaptor with range,” fr fr πŸ”₯.

🧚 Friends 🧚

Friend zone, but make it templates:

template<typename... > struct __inner_type_impl
template<typename _OutA1 , typename _OutA2 , typename... _InA> bool
    operator== (const scoped_allocator_adaptor< _OutA1, _InA... > &__a,
    const scoped_allocator_adaptor< _OutA2, _InA... > &__b) noexcept

Related Symbols time, and the page is very clear: (Note that these are not member symbols.) Same operator== energy, but not a member symbol:

template<typename _OutA1 , typename _OutA2 , typename... _InA> bool
    operator== (const scoped_allocator_adaptor< _OutA1, _InA... > &__a,
    const scoped_allocator_adaptor< _OutA2, _InA... > &__b) noexcept

πŸ’– Detailed Description πŸ’–

Here’s the detailed description, and I quote literally, including the slightly feral stray quote mark β€” not me fixing it, just reporting it πŸ’€:

template<typename _OuterAlloc, typename... _InnerAllocs>
    class std::scoped_allocator_adaptor< _OuterAlloc, _InnerAllocs >"An
    adaptor to recursively pass an allocator to the objects it constructs.

That’s it. That’s the whole detailed description. The quote mark is part of the original vibe, bestie πŸŽ€.


πŸ‘‘ Author πŸ‘‘

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

So yeah, Doxygen wrote it, not a girl with a keyboard. Respect the pipeline 🫢.


Ok that’s the whole page, bestie πŸ’–βœ¨. Source/version vibes: libstdc++, the footer string is libststd::scoped_all... _InnerAllocs >(3cxx), and there’s no date printed, so I’m not inventing one πŸ’€. Muah πŸ’‹πŸŒˆ.

πŸ“¦ where this page comes from