std::experi...c_allocator(3)

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

πŸ’… std::experimental::pmr::polymorphic_allocator::polymorphic_allocator πŸ’…

okay so bestie, you're in the C++ Standard Libary manual β€” yes, that's the manual name, typo and all, we don't make the rules β€” and this page is literally all about std::experimental::pmr::polymorphic_allocator::polymorphic_allocator. It's giving constructor main character energy and I'm obsessed. 🫢✨


🌸 NAME 🌸

std::experimental::pmr::polymorphic_allocator::polymorphic_allocator β€” that's the name, and then the page says it again: std::experimental::pmr::polymorphic_allocator::polymorphic_allocator. say it with your chest, bestie. πŸ’…

✨ Synopsis ✨

polymorphic_allocator() noexcept;
(1)
polymorphic_allocator( const polymorphic_allocator& other ) noexcept
= default; (2)
template< class U >
(3)
polymorphic_allocator( const polymorphic_allocator<U>& other )
noexcept;
polymorphic_allocator( memory_resource* r );
(4)

Constructs a new polymorphic_allocator. lowkey straightforward, highkey essential. πŸŽ€

  • 1) Constructs a polymorphic_allocator using the return value of std::experimental::pmr::get_default_resource() as the underlying memory resource.
  • 2, 3) Constructs a polymorphic_allocator using other.resource() as the underlying memory resource.
  • 4) Constructs a polymorphic_allocator using r as the underlying memory resource. This constructor provides an implicit conversion from memory_resource*.

πŸ’– Parameters πŸ’–

  • other β€” another polymorphic_allocator to copy from. copy from bestie, got it. 🫢
  • r β€” pointer to the memory resource to use. May not be null. 🚨 no nulls allowed, periodt.

😭 Exceptions 😭

  • 4) Throws nothing. πŸ•ŠοΈ constructor 4 is literally unbothered.

🏷️ Category: 🏷️

  • Noindexed pages

mwah πŸ’‹ β€” this page comes from http://cppreference.com, dated 2024.06.10. bye bestie, go construct something iconic. 🌈✨

πŸ“¦ where this page comes from