std::experi...ic_allocator(3)

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

✨ std::experi...ic_allocator(3) ✨

okay bestie, welcome to the C++ Standard Libary manual page for std::experi...ic_allocator(3) β€” yes, the manual name is spelled Libary right there in the header, and we are keeping it exactly, no cap. πŸ’…πŸ¦‹

This is the group chat where allocator lore gets cute but stays factual. periodt. ✨


πŸ’– NAME πŸ’–

  • std::experimental::pmr::polymorphic_allocator - std::experimental::pmr::polymorphic_allocator

(yes, the NAME line is literally the same thing twice, and we're not erasing that iconic duplication, bestie.)

🌸 Synopsis 🌸

Defined in header <experimental/memory_resource>
template< class T >                               (library fundamentals TS)
class polymorphic_allocator;

The class template std::experimental::pmr::polymorphic_allocator is an Allocator whose allocation behavior depends on the memory resource it is constructed with. so like, different instances of polymorphic_allocator can exhibit entirely different allocation behavior β€” highkey unhinged in the best way. this runtime polymorphism allows objects using polymorphic_allocator to behave as if they used different allocator types at run time despite the identical static allocator type. slay. ✨

πŸ¦‹ Member types πŸ¦‹

  • value_type β€” member type definition: T

πŸ’… Member functions πŸ’…

  • constructor β€” constructs a polymorphic_allocator (public member function)
  • destructor β€” implicitly declared destructor (implicitly declared) (public member function)
  • operator= β€” copy assignment operator (public member function)

🌈 Public member functions 🌈

  • allocate β€” allocate memory (public member function)
  • deallocate β€” deallocate memory (public member function)
  • construct β€” constructs an object in allocated storage (public member function)
  • destroy β€” destroys an object in allocated storage (public member function)
  • select_on_container_copy_construction β€” create a new polymorphic_allocator for use by a container's copy constructor (public member function)
  • resource β€” returns a pointer to the underlying memory resource (public member function)

🌟 Non-member functions 🌟

  • operator== β€” compare two polymorphic_allocators (function)
  • operator!= β€” (function)

πŸŽ€ Category: πŸŽ€

  • Noindexed pages

πŸ’– cute little footer sign-off: source/version is http://cppreference.com, date is 2024.06.10, and the page title is std::experi...ic_allocator(3). that's the whole footer vibe, bestie β€” we ate and left no crumbs. πŸŽ€βœ¨

πŸ“¦ where this page comes from