[…]namespace std { template<class Ref, class V, class Allocator> class generator<Ref, V, Allocator>::promise_type { public: […] void* operator new(size_t size) requires same_as<Allocator, void> || default_initializable<Allocator>; template<class Alloc, class... Args> requires same_as<Allocator, void> || convertible_to<const Alloc&, Allocator> void* operator new(size_t size, allocator_arg_t, const Alloc& alloc, const Args&...); template<class This, class Alloc, class... Args> requires same_as<Allocator, void> || convertible_to<const Alloc&, Allocator> void* operator new(size_t size, const This&, allocator_arg_t, const Alloc& alloc, const Args&...); […] }; }
void* operator new(size_t size) requires same_as<Allocator, void> || default_initializable<Allocator>; template<class Alloc, class... Args> requires same_as<Allocator, void> || convertible_to<const Alloc&, Allocator> void* operator new(size_t size, allocator_arg_t, const Alloc& alloc, const Args&...); template<class This, class Alloc, class... Args> requires same_as<Allocator, void> || convertible_to<const Alloc&, Allocator> void* operator new(size_t size, const This&, allocator_arg_t, const Alloc& alloc, const Args&...);
-17- Let
A
be
(17.1) —
Allocator
, if it is notvoid
,(17.2) —
Alloc
for the overloads with a template parameterAlloc
, or(17.3) —
allocator<void>
otherwise.Let
-18- Mandates:B
beallocator_traits<A>::template rebind_alloc<U>
whereU
is an unspecified type whose size and alignment are both__STDCPP_DEFAULT_NEW_ALIGNMENT__
.allocator_traits<B>::pointer
is a pointer type. For the overloads with a template parameterAlloc
,same_as<Allocator, void> || convertible_to<const Alloc&, Allocator>
is modeled. -19- Effects: Initializes an allocatorb
of typeB
withA(alloc)
, for the overloads with a function parameteralloc
, and withA()
otherwise. Usesb
to allocate storage for the smallest array ofU
sufficient to provide storage for a coroutine state of sizesize
, and unspecified additional state necessary to ensure thatoperator delete
can later deallocate this memory block with an allocator equal tob
. -20- Returns: A pointer to the allocated storage.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4