Boost logo

Boost :

From: Bagaskoro Kang (bagaskoro.kang_at_[hidden])
Date: 2019-06-27 01:52:52


 Zach Laine dia menulis

> We don't have enough reviews yet, so we're extending the review by two
> weeks.
>
> Please review this small and useful library!
>

we have C apis set that we call from C++ which do not work with this
library?

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 ???

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<Numf, DoFree> upNumf;
    void * pNumf;
    int ret = posix_memalign(&pNumf, 64, nNumf);
    if (!ret)
        upNumf.reset((Numf*)pNumf);

I do not ssee the out_ptr class is very useful if it can not do these two
thing

#
Terima kasih
#


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk