From: "Gennaro Prota" <[EMAIL PROTECTED]>
> On Sat, 25 Jan 2003 15:35:48 +0200, "Peter Dimov" <[EMAIL PROTECTED]>
> wrote:
>
> > I.e. it is up to you to decide whether this is a bug or a
> >feature. My opinion is that it is a bug... except that From and To must
be
> >complete, of course, or is_convertible may violate ODR.
>
> 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 };

class From {};
class To: public From {};

enum { b = is_convertible<From, To>::value };

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

Reply via email to