Boost logo

Boost :

Subject: Re: [boost] New dependency report
From: Eric Niebler (eniebler_at_[hidden])
Date: 2014-06-13 19:03:09


On 6/13/2014 11:29 AM, Ion Gaztañaga wrote:
> El 13/06/2014 20:27, Peter Dimov escribió:
>> If you want to dispatch, type traits with a ::value == 0 should be
>> _convertible_ to false_type, and type traits with a ::value == 1 should
>> be convertible to true_type, but they should not be required to derive
>> from them. This convertibility can be achieved from the
>> true_type/false_type side.
>
> +1.

Whether the base classes are a mistake or not, they're a fact. And
without changing std::integral_constant, we cannot make type traits as
you describe them play nicely with code that dispatches to
std::true_type/std::false_type.

That said, I think your idea is intriguing, even if it doesn't solve all
the problems.

-- 
Eric Niebler
Boost.org
http://www.boost.org

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