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

102 lines
3.2 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[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)