102 lines
3.2 KiB
Markdown
102 lines
3.2 KiB
Markdown
[allocator.adaptor.cnstr]
|
||
|
||
# 20 Memory management library [[mem]](./#mem)
|
||
|
||
## 20.6 Class template scoped_allocator_adaptor [[allocator.adaptor]](allocator.adaptor#cnstr)
|
||
|
||
### 20.6.3 Constructors [allocator.adaptor.cnstr]
|
||
|
||
[ð](#lib:scoped_allocator_adaptor,constructor)
|
||
|
||
`scoped_allocator_adaptor();
|
||
`
|
||
|
||
[1](#1)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/memory.tex#L8787)
|
||
|
||
*Effects*: Value-initializes the OuterAlloc base class and the inner allocator
|
||
object[.](#1.sentence-1)
|
||
|
||
[ð](#lib:scoped_allocator_adaptor,constructor_)
|
||
|
||
`template<class OuterA2>
|
||
scoped_allocator_adaptor(OuterA2&& outerAlloc, const InnerAllocs&... innerAllocs) noexcept;
|
||
`
|
||
|
||
[2](#2)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/memory.tex#L8800)
|
||
|
||
*Constraints*: is_constructible_v<OuterAlloc, OuterA2> is true[.](#2.sentence-1)
|
||
|
||
[3](#3)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/memory.tex#L8804)
|
||
|
||
*Effects*: Initializes the OuterAlloc base class withstd::forward<OuterA2>(outerAlloc) and inner with innerAllocs... (hence recursively initializing each allocator within the adaptor with the corresponding
|
||
allocator from the argument list)[.](#3.sentence-1)
|
||
|
||
[ð](#lib:scoped_allocator_adaptor,constructor__)
|
||
|
||
`scoped_allocator_adaptor(const scoped_allocator_adaptor& other) noexcept;
|
||
`
|
||
|
||
[4](#4)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/memory.tex#L8818)
|
||
|
||
*Effects*: Initializes each allocator within the adaptor with the corresponding allocator
|
||
from other[.](#4.sentence-1)
|
||
|
||
[ð](#lib:scoped_allocator_adaptor,constructor___)
|
||
|
||
`scoped_allocator_adaptor(scoped_allocator_adaptor&& other) noexcept;
|
||
`
|
||
|
||
[5](#5)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/memory.tex#L8830)
|
||
|
||
*Effects*: Move constructs each allocator within the adaptor with the corresponding allocator
|
||
from other[.](#5.sentence-1)
|
||
|
||
[ð](#lib:scoped_allocator_adaptor,constructor____)
|
||
|
||
`template<class OuterA2>
|
||
scoped_allocator_adaptor(
|
||
const scoped_allocator_adaptor<OuterA2, InnerAllocs...>& other) noexcept;
|
||
`
|
||
|
||
[6](#6)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/memory.tex#L8844)
|
||
|
||
*Constraints*: is_constructible_v<OuterAlloc, const OuterA2&> is true[.](#6.sentence-1)
|
||
|
||
[7](#7)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/memory.tex#L8848)
|
||
|
||
*Effects*: Initializes each allocator within the adaptor with the corresponding allocator
|
||
from other[.](#7.sentence-1)
|
||
|
||
[ð](#lib:scoped_allocator_adaptor,constructor_____)
|
||
|
||
`template<class OuterA2>
|
||
scoped_allocator_adaptor(scoped_allocator_adaptor<OuterA2, InnerAllocs...>&& other) noexcept;
|
||
`
|
||
|
||
[8](#8)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/memory.tex#L8861)
|
||
|
||
*Constraints*: is_constructible_v<OuterAlloc, OuterA2> is true[.](#8.sentence-1)
|
||
|
||
[9](#9)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/memory.tex#L8865)
|
||
|
||
*Effects*: Initializes each allocator within the adaptor with the corresponding allocator rvalue
|
||
from other[.](#9.sentence-1)
|