Files
cppdraft_translate/cppdraft/allocator/adaptor/cnstr.md
2025-10-25 03:02:53 +03:00

3.2 KiB
Raw Blame History

[allocator.adaptor.cnstr]

20 Memory management library [mem]

20.6 Class template scoped_allocator_adaptor [allocator.adaptor]

20.6.3 Constructors [allocator.adaptor.cnstr]

🔗

scoped_allocator_adaptor();

1

#

Effects: Value-initializes the OuterAlloc base class and the inner allocator object.

🔗

template<class OuterA2> scoped_allocator_adaptor(OuterA2&& outerAlloc, const InnerAllocs&... innerAllocs) noexcept;

2

#

Constraints: is_constructible_v<OuterAlloc, OuterA2> is true.

3

#

Effects: Initializes the OuterAlloc base class withstd::forward(outerAlloc) and inner with innerAllocs... (hence recursively initializing each allocator within the adaptor with the corresponding allocator from the argument list).

🔗

scoped_allocator_adaptor(const scoped_allocator_adaptor& other) noexcept;

4

#

Effects: Initializes each allocator within the adaptor with the corresponding allocator from other.

🔗

scoped_allocator_adaptor(scoped_allocator_adaptor&& other) noexcept;

5

#

Effects: Move constructs each allocator within the adaptor with the corresponding allocator from other.

🔗

template<class OuterA2> scoped_allocator_adaptor( const scoped_allocator_adaptor<OuterA2, InnerAllocs...>& other) noexcept;

6

#

Constraints: is_constructible_v<OuterAlloc, const OuterA2&> is true.

7

#

Effects: Initializes each allocator within the adaptor with the corresponding allocator from other.

🔗

template<class OuterA2> scoped_allocator_adaptor(scoped_allocator_adaptor<OuterA2, InnerAllocs...>&& other) noexcept;

8

#

Constraints: is_constructible_v<OuterAlloc, OuterA2> is true.

9

#

Effects: Initializes each allocator within the adaptor with the corresponding allocator rvalue from other.