Boost logo

Boost :

From: JeanHeyd Meneide (phdofthehouse_at_[hidden])
Date: 2019-06-27 11:28:16


On Thu, Jun 27, 2019 at 3:27 AM Gavin Lambert via Boost <
boost_at_[hidden]> wrote:

> On 27/06/2019 18:11, JeanHeyd Meneide wrote:
> > On Thu, Jun 27, 2019 at 12:23 AM Gavin Lambert wrote:
> >> And "UB-based optimization" does not inspire confidence.
> >
> > There is nothing I can do for standard pointers other than to give up the
> > optimization or to use the UB. (This is one of the reasons it was
> proposed
> > to the standard, asides from being an existing practice with wide
> > implementation experience.)
>
> Correct me if I'm wrong, but the clever implementation appears to depend
> on several #defines which are entirely undocumented.
> ...
> And the "clever" version of inout_ptr is enabled by default, with all of
> these undocumented choices.
>

Yes, that was an oversight on my part. It's been corrected in the
post-review branch, with full documentation:
https://github.com/ThePhD/out_ptr/blob/feature/boost.review/docs/out_ptr/config.adoc

The library prefers the fast version by default. It has a configuration
option to choose where the clever optimization might look for the pointer
value. Given feedback, I think it would be better to maybe have it off by
default: that's a small change to flipping how the configuration macros
work right now.

So far the only reported failures come from libc++ using this clever
optimization. This was patched in to be fixed in the post-review branch,
but I can't merge such changes to Master until the review is over.

Sincerely,
JeanHeyd


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