Boost logo

Boost :

From: Mike Conley (conley.141_at_[hidden])
Date: 2003-04-26 17:55:34


David Abrahams <dave_at_[hidden]> wrote in
news:uof2t8b4v.fsf_at_[hidden]:

> This one is sticky.
>
> class Y : X { true_type f() { return is_convertible<Y,X>::type();
> } }; false_type x = is_convertible<Y,X>::type();
>

I'm not sure I see the problem here. If is_convertible is a built in
compile time operator, the results should depend upon context. This should
work as expected. Really, it's no more interesting than:

char c[23];
cout << sizeof(c);
{
   char c[22];
   cout << sizeof(c);
}

printing 2322.

-- 
Mike Conley

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