
10 Mar
2011
10 Mar
'11
4:31 p.m.
Thanks to Christopher Jefferson, I discovered a bug in the trunk (in fact in 1.46.0) for is_base_of in the type_traits library.
is_base_of<int, int>::value should be true according to the doc: "is_base_of<Base, Base>::value is an integral constant expression that evaluates to true: a class is regarded as it's own base.
I will make the docs clearer on this point, but there was a change between TR1 and C++0x behavior which means that is_base_of<T, T>::value is true only for class types, and in recent releases is_base_of has changed to follow C++0x behavior. HTH, John.