std::scoped...r_allocator(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

πŸ’– NAME πŸ’–

std::scoped_allocator_adaptor::outer_allocator β€” std::scoped_allocator_adaptor::outer_allocator

okay so bestie, this is the std::scoped...r_allocator(3) page from the C++ Standard Libary manual, and it’s all about std::scoped_allocator_adaptor::outer_allocator. The NAME line really does say the same thing twice β€” iconic, honestly. πŸ’…


✨ Synopsis ✨

Here’s the exact synopsis, no cap:

          Defined in header <scoped_allocator>
          outer_allocator_type& outer_allocator() noexcept;             (1)
       (since C++11)
          const outer_allocator_type& outer_allocator() const noexcept; (2)
       (since C++11)

It obtains a reference to the outer allocator used to declare this class. The two overloads are giving matching-set energy:

  1. Returns static_cast<OuterAlloc&>(*this).
  2. Returns static_cast<const OuterAlloc&>(*this).

πŸŽ€ Parameters πŸŽ€

(none) β€” literally zero parameters, bestie. Clean, simple, slay. ✨


πŸ¦‹ Return value πŸ¦‹

A reference to OuterAlloc. That’s the whole vibe. 🫢


🌈 See also 🌈

  • inner_allocator β€” obtains an inner_allocator reference (public member function).

πŸŽ€ cute sign-off: source/version http://cppreference.com, date 2024.06.10, page std::scoped...r_allocator(3). Bye bestie, go slay your allocators! πŸ’–
πŸ“¦ where this page comes from