Boost logo

Boost :

Subject: Re: [boost] New dependency report
From: Eric Niebler (eniebler_at_[hidden])
Date: 2014-06-13 14:07:52


On 06/13/2014 10:48 AM, Peter Dimov wrote:
> Eric Niebler wrote:
>> I think in the C++11 world, boost type_traits should *all* inherit
>> from std::true_type. That's easily accomplished by aliasing mpl::true_
>> to std::true_type. It fixes everything.
>
> I can't help but note that you're focusing on the wrong aspect of the
> problem. In the C++11 world, we have type traits in std and none of this
> matters. Use of Boost type traits is motivated by the need to support
> C++03.

I'm focusing on a larger set of problems. And use use of mpl isn't
restricted to C++03 code. Nor is boost.type_traits for that matter; it's
used in code that must be portable, like boost libraries. Anyone using a
boost library with a C++11 compiler is getting old-style type traits
whether they like it or not, and these implementation details can
sometimes bubble out in annoying ways. If the user of a lib has to
specialize a type trait, they'll be surprised when they use
std::true_type and find their specialization doesn't meet the lib's
requirements, for instance.

Eric


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