Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-05-09 21:44:09


----- Original Message -----
From: "Gennadiy Rozental" <rogeeff_at_[hidden]>

> #include <boost/type_traits/conversion_traits.hpp>
> template<typename T>
> struct A : T
> {
> A() {}
> template<class T1>
> A( A<T1> const& rhs ) : T( rhs ) {}
> };
>
> struct B {};
> struct C {};
>
> int main() {
> bool bb = boost::is_convertible<A<B>,A<C> >::value; // here value bb
is
> true, while I expext it will be false

Why?

> return 0;
> }
>
> With MSVC 6.5 I have got incorrect value bb - true.
> Why?

maybe because... it's the correct value?

-Dave


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