On Wed, Jun 26, 2019 at 11:05 PM Gavin Lambert via Boost < boost@lists.boost.org> wrote:
On 27/06/2019 13:52, Bagaskoro Kang wrote:
the creator apis have two out params: Interface** pointer and unsigned* size and the destroyer functions must be called with pointer and the size.
Interface** obj; unsigned size; int ret = Create(... ... ... &obj, &size);
and then we need to call a Release(obj, size) if the ret is success.
I do not think I can use the out_ptr with these APIs ???
struct sized_deleter {
unsigned size;
...
};
using bop = boost::out_ptr;
std::unique_ptr
also we call the Linux kernel C API posix_memalign() and we assign to unique_ptr. is not possible to use out_ptr with ?
std::unique_ptr
upNumf; void * pNumf; int ret = posix_memalign(&pNumf, 64, nNumf); if (!ret) upNumf.reset((Numf*)pNumf);
using bop = boost::out_ptr;
std::unique_ptr