Files
2025-10-25 03:02:53 +03:00

1.7 KiB

[mem.poly.allocator.ctor]

20 Memory management library [mem]

20.5 Memory resources [mem.res]

20.5.3 Class template polymorphic_allocator [mem.poly.allocator.class]

20.5.3.2 Constructors [mem.poly.allocator.ctor]

🔗

polymorphic_allocator() noexcept;

1

#

Effects: Sets memory_rsrc to get_default_resource().

🔗

polymorphic_allocator(memory_resource* r);

2

#

Preconditions: r is non-null.

3

#

Effects: Sets memory_rsrc to r.

4

#

Throws: Nothing.

5

#

[Note 1:

This constructor provides an implicit conversion from memory_resource*.

— end note]

🔗

template<class U> polymorphic_allocator(const polymorphic_allocator<U>& other) noexcept;

6

#

Effects: Sets memory_rsrc to other.resource().