Boost logo

Boost :

From: Howard Hinnant (hinnant_at_[hidden])
Date: 2001-01-20 11:03:34

David Abrahams wrote on 1/19/2001 5:58 PM
>It seems like a number of the templates aren't able to give good results for
>user-defined types. For example, shouldn't is_integral<T> check
>numeric_limits<T>::is_integer when possible?

Speaking only for myself, I view the type_traits structs as answering:
What is this? But I see std::numeric_limits answering: How does this
behave? So, for example given the class BigInt, I would expect
is_integral<BigInt> to answer false, is_class<BigInt> to answer true, and
numeric_limits<BigInt>::is_integer to answer true (assuming BigInt's
author had specialized numeric_limits).

Thus user-defined types will only answer true to one of:


with the latter two requiring special effort (unfortunately).


Boost list run by bdawes at, gregod at, cpdaniel at, john at