std::experi...ic_allocator(3)
β¨ 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 newpolymorphic_allocatorfor 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 twopolymorphic_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
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms