13 Jun
2014
13 Jun
'14
11:03 p.m.
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