Boost logo

Boost :

From: Gennaro Prota (gennaro_prota_at_[hidden])
Date: 2003-01-25 10:52:14


--- Peter Dimov <pdimov_at_[hidden]> wrote:
> From: "Gennaro Prota" <gennaro_prota_at_[hidden]>

> > I'm even more radical than that. Even the fact that is_convertible may
> > violate ODR is a limitation of the current solution. I think we must
> > *first* decide what we want then see how to implement it. If we want
> > access checking to be performed in the context of usage then the class
> > template is not adequate. And if we don't want that, then the class
> > template is ok and no violation of ODR occurs (unless there's some
> > reason other than access checking why value can depend on the context
> > and I'm missing it right now).
>
> class From;
> class To;
>
> enum { a = is_convertible<From, To>::value };

Yes :-) I should have said: two cases, both well-formed, in which value is
different (I assume you agree that the above should be ill-formed, because if
you don't know the definition of the two classes, then you don't know e.g. if a
conversion operator exists either - In other words: not enough information to
say).

Genny.

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com


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