std::scoped_allocator_adaptor<OuterAlloc,InnerAlloc...>::outermost, outermost-construct, outermost-destroy - cppreference.com
From cppreference.com
|
(1) | (exposition only*) |
|
(2) | (exposition only*) |
|
(3) | (exposition only*) |
These exposition-only helper member function templates are used in member functions construct() and destroy().
1) Obtains the outermost allocator of alloc.
- If the expression
alloc.outer_allocator()is valid, returnsoutermost(alloc.outer_allocator()). - Otherwise, returns
alloc.
2,3) Constructs or destroys an object using the outermost allocator of *this.
Given the type std::allocator_traits<std::remove_reference_t<decltype(outermost ())>> as outermost_traits:
2) Equivalent to outermost_traits::construct(outermost (), p, std::forward<Args>(args)...);.
3) Equivalent to outermost_traits::destroy(outermost (), p);.
Defect reports
The following behavior-changing defect reports were applied retroactively to previously published C++ standards.
| DR | Applied to | Behavior as published | Correct behavior |
|---|---|---|---|
| LWG 3116 | C++11 | the recursion condition for outermost was “allochas the member function outer_allocator()”
|
changed to “the expressionalloc.outer_allocator() is valid”
|
See also
| constructs an object in the allocated storage (function template) [edit] | |
| destructs an object stored in the allocated storage (function template) [edit] |