| std::scoped_allocator_adaptor::outermost,outermost-construct,(3) | C++ Standard Libary | std::scoped_allocator_adaptor::outermost,outermost-construct,(3) |
NAME¶
std::scoped_allocator_adaptor::outermost,outermost-construct, - std::scoped_allocator_adaptor::outermost,outermost-construct,
Synopsis¶
template< class Alloc > (1) (exposition only*) /* unspecified */ /*outermost*/( Alloc&& alloc = *this ); template< class T, class... Args > (2) (exposition only*) void /*outermost-construct*/( T* p, Args&&... args ); template< class T > (3) (exposition only*) void /*outermost-destroy*/( T* p );
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, returns
outermost (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
the recursion condition for LWG 3116 C++11 outermost was “alloc
changed to “the expression
has the member function alloc.outer_allocator() is valid”
outer_allocator()”
See also¶
construct constructs an object in the allocated storage [static] (function template) destroy destructs an object stored in the allocated storage [static] (function template)
| 2026.11.10 | http://cppreference.com |