std::experimental::pmr::polymorphic_allocator::polymorphic_allocator - cppreference.com (original) (raw)
| polymorphic_allocator() noexcept; | (1) | | | ------------------------------------------------------------------------------------------------ | --- | | | polymorphic_allocator( const polymorphic_allocator& other ) noexcept = default; | (2) | | | template< class U > polymorphic_allocator( const polymorphic_allocator<U>& other ) noexcept; | (3) | | | polymorphic_allocator( memory_resource* r ); | (4) | |
Constructs a new polymorphic_allocator.
2,3) Constructs a polymorphic_allocator using other.resource() as the underlying memory resource.
- Constructs a
polymorphic_allocatorusing r as the underlying memory resource. This constructor provides an implicit conversion frommemory_resource*.
[edit] Parameters
| other | - | another polymorphic_allocator to copy from |
|---|---|---|
| r | - | pointer to the memory resource to use. May not be null |
[edit] Exceptions
- Throws nothing.