std::scoped_allocator_adaptor<OuterAlloc,InnerAlloc...>::outermost, outermost-construct, outermost-destroy - cppreference.com (original) (raw)
| template< class Alloc > /* unspecified */ /*outermost*/( Alloc&& alloc = *this ); | (1) | (exposition only*) |
|---|---|---|
| template< class T, class... Args > void /*outermost-construct*/( T* p, Args&&... args ); | (2) | (exposition only*) |
| template< class T > void /*outermost-destroy*/( T* p ); | (3) | (exposition only*) |
These exposition-only helper member function templates are used in member functions construct() and destroy().
- Obtains the outermost allocator of alloc.
- If the expression alloc.outer_allocator() is valid, returns
_outermost_(alloc.outer_allocator()). - Otherwise, returns alloc.
2,3) Constructs or destroys an object using the outermost allocator of *this.
Equivalent to outermost_traits::construct(
_outermost_(), p, std::forward<Args>(args)...);.Equivalent to outermost_traits::destroy(
_outermost_(), p);.
[edit] 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” |
[edit] See also
| | constructs an object in the allocated storage (function template) [edit] | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | destructs an object stored in the allocated storage (function template) [edit] |