operator Pointer*() const noexcept;
operator void**() const noexcept;
Exposes the address of a
void* object to a foreign function which will generally re-initialize it.
*thisto the address of stored
*thisto the address of a
void*object. This conversion function participates in overload resolution only if
Pointeris not same as
void*, and the program is ill-formed if
Pointeris not a pointer type.
void*object is equal the value of the stored
Pointerobject converted to
void*, and any modification to it affects the
Pointervalue used in the destructor. Accessing the
void*object outside the lifetime of
*thishas undefined behavior.
Once one of these two conversion functions has been called on an
out_ptr_t object, the other shall not be called on it, otherwise, the behavior is undefined.
void*object that satisfies aforementioned requirements.
If the object pointed by the return value has not been rewritten, it is equal to
On common implementations, the object representation of every
Pointer that is a pointer type is compatible with that of
void*, and therefore these implementations typically store the
void* object within the storage for the
Pointer object, no additional storage needed:
std::byte[sizeof(void*)]member subobject may be used, and both conversion functions return the address of objects implicitly created within the array.
Pointermember subobject may be used for both conversion functions, and (2) may directly returns its address
Pointer is a pointer type whose object representation is incompatible with that of
void*, an additional
bool flag may be needed for recording whether (1) (or (2)) has been called.
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.