Boost logo

Boost :

Subject: Re: [boost] Review Request: impl_ptr (pimpl)
From: Seth (bugs_at_[hidden])
Date: 2017-08-22 21:07:32


On 21-08-17 11:48, Vladimir Batov via Boost wrote:
> That's ugly and wrong.

/I'm just gonna say it's neither ugly nor wrong./

On 22-08-17 09:50, Gevorg Voskanyan via Boost wrote:
> so for a long time now, we have a precedent too.

One of a great many.

Same for specializations of std::hash, boost::hash,
boost::fusion::extension::*, boost::spirit::traits::*, etc.

That said, I'm not convinced there isn't a "better" way: why not
implement another layer of indirection. Make it a trait:

     boost::impl_ptr::traits::implementation_for<T, Enable>::type

could be made to refer to the user-defined implementation type. That way
the "pain" is only in 1 line where the trait is specialized.


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