is_base_of<int, int> behaviour.

View: New views
2 Messages — Rating Filter:   Alert me  

is_base_of<int, int> behaviour.

by John Maddock :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Folks,

Some time ago we made is_base_of<int,int>::value true, for reasons that
escape me, and the TR1 followed this.

However, C++0X makes is_base_of<non_class, non_class>::value to be false,
which seems all round more logical to me.

While I'm sorting out what is_base_of<T, const T> does, it's a good time to
fix this as well.  Are there any objections to changing the behaviour of
is_base_of to match C++0X?

Cheers, John.

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Re: is_base_of<int, int> behaviour.

by Edward Diener-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

John Maddock wrote:
> Folks,
>
> Some time ago we made is_base_of<int,int>::value true, for reasons that
> escape me, and the TR1 followed this.
>
> However, C++0X makes is_base_of<non_class, non_class>::value to be
> false, which seems all round more logical to me.

Not only that but I would have intuitively thought that is_base_of<>
would always be false if either template parameter is a non-class type.

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost