std::scoped_allocator_adaptor::scoped_allocator_adaptor - cppreference.com

##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# std::scoped_allocator_adaptor::scoped_allocator_adaptor

From cppreference.com
< cpp‎ | memory‎ | scoped allocator adaptor

Defined in header `<scoped_allocator>` |  |
scoped_allocator_adaptor() | (1) | (since C++11)
template< class OuterA2 > scoped_allocator_adaptor( OuterA2&& outerAlloc, const InnerAllocs&... innerAllocs) | (2) | (since C++11)
scoped_allocator_adaptor( const scoped_allocator_adaptor& other ) | (3) | (since C++11)
scoped_allocator_adaptor( scoped_allocator_adaptor&& other ) | (4) | (since C++11)
template< class OuterA2 > scoped_allocator_adaptor( const scoped_allocator_adaptor<OuterA2, InnerAllocs...>& other ) | (5) | (since C++11)
template< class OuterA2 > scoped_allocator_adaptor( scoped_allocator_adaptor<OuterA2, InnerAllocs...>&& other ) | (6) | (since C++11)

1) Default constructor: value-initializes the `OuterAlloc` base class and the inner allocator member object, if used by the implementation.

2) Constructs the base class `OuterAlloc` from std::forward<OuterA2>(outerAlloc), and the inner allocators with `innerAllocs...`.

3) Copy-constructor: initializes each allocator from the corresponding allocator of `other`

4) Move-constructor: moves each allocator from the corresponding allocator of `other` into `*this`

5) Initializes each allocator from the corresponding allocator of `other`

6) Initializes each allocator from the corresponding allocator of `other`, using move semantics.

### [edit] Parameters

outerAlloc | - | constructor argument for the outer allocator
innerAllocs... | - | constructor arguments for the inner allocators
other | - | another `std::scoped_allocator_adaptor`

### [edit] Exceptions

2-6)
`noexcept` specification:
noexcept

### [edit] See also

allocate | allocates uninitialized storage using the outer allocator (public member function) [edit]
construct | constructs an object in allocated storage, passing the inner allocator to its constructor if appropriate (public member function) [edit]

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/memory/scoped_allocator_adaptor/scoped_allocator_adaptor&oldid=62785"
Category:

- unconditionally noexcept