Boost logo

Boost :

From: Alexander Grund (alexander.grund_at_[hidden])
Date: 2019-06-28 08:33:34


Am 27.06.19 um 16:06 schrieb David Sankel via Boost:
> It looks like "clever" mode was #ifdef'ed out, but removing it as cruft
> would improve maintainability of the implementation and remove the
> complexity of having an additional `core_out_ptr_t` class.
Very much in favor of this especially after discussion in
https://github.com/ThePhD/out_ptr/issues/19:
TLDR: "clever" contains a potential double-free and fix seems to be not
considered (or postboned) as it is "off by default"
Therefore having an unsafe, buggy class inside the library should not be
allowed.
> The provided implementation works for smart pointers that follow
> conventions like the standard, but has some additional logic if the types
> happen to be `std::shared_ptr` or `boost::shared_ptr`. This hard coded
> special casing won't work with, say, a company specific shared pointer
> implementation. This relates to my earlier comment that the customization
> point should be simplified.
Great point. I'd suggest to provide 1 implementation and let
customization points handle these "special cases". This will be a great
test on how to implement those using the "official" customization points
and whether the API is sufficient.




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