Subject: Re: [boost] Review Request: impl_ptr (pimpl)
From: Vladimir Batov (Vladimir.Batov_at_[hidden])
Date: 2017-08-22 21:37:55
On 08/23/2017 07:07 AM, Seth via Boost wrote:
> 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./
OK, OK. :-) We certainly won't be arguing that. :-) I just thought that
the words themselves clearly indicated that it was in my view, by my
taste. I do not feel comfortable seeing the code that looks like the
user introduces something, fiddles in the boost (or std) namespace. I
have a feeling I might be not the only one feeling that way. :-)
> On 22-08-17 09:50, Gevorg Voskanyan via Boost wrote:
>> so for a long time now, we have a precedent too.
Gevorg was certainly correct pointing out this boost::assertion_failed()
precedent... Something I have in my code. :-)
> 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.
Before we embark on exploring other possibilities, is there something in
particular that you object to in the proposed
template<> struct boost::impl_ptr<Foo>::implementation
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk