
22 Aug
2017
22 Aug
'17
9:07 p.m.
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.