boost.out_ptr: the C+11 abstraction for passing smart pointers as parameters to `+T**` arguments
This library automates the
.reset(…) call with
boost::out_ptr::out_ptr(…) wrapping an argument passed to a C-style function taking a
T** argument. Additionally, it automates the
.reset(…) paradigm with
boost::out_ptr::inout_ptr(…) in cases where the
T** argument passed to the function will both delete and then allocate the resource being handled.
Additional optimizations are implemented within the library to ensure good performance by default for a myriad of types, including
std::unique_ptr. It also helps catch small errors in using
shared_ptr-types reset calls, and works out-of-the-box for many other types including the upcoming
boost::intrusive_ptr, and any other types which follow the
.release() paradigm (or have constructors that behave similarly).
Copyright, License, and Acknowledgments
This documentation is
Copyright ⓒ 2019 ThePhD
and is distributed under the Boost Software License, Version 1.0.