std::inout_ptr
Min standard notice:
Header: <memory>
Returns an inout_ptr_t with deduced template arguments that captures arguments for resetting by reference.
# Declarations
template< class Pointer = void, class Smart, class... Args >
auto inout_ptr( Smart& s, Args&&... args );
(since C++23)
# Parameters
s: the object (typically a smart pointer) to adaptargs...: the arguments for resetting to capture
# Return value
std::inout_ptr_t<Smart, P, Args&&>(s, std::forward
# Notes
Users may specify the template argument for the template parameter Pointer, in order to interoperate with foreign functions that take a Pointer*.
As all arguments for resetting are captured by reference, the returned inout_ptr_t should be a temporary object destroyed at the end of the full-expression containing the call to the foreign function, in order to avoid dangling references.
# Example
This section is incompleteReason: no example