Boost logo

Boost :

From: John Maddock (jm_at_[hidden])
Date: 2003-01-25 07:00:55


> > I'm beginning to think that the only way to deal with this is to add
array
> > types to the list of types banned from the "To" parameter. Otherwise we
> get
> > into the old context sensitive answer problem.
>
> I think that no special ban list is necessary. Given the specification
> "Returns true if and only if an lvalue of type From is convertible to To
> (4p3)" the implication is that is_convertible should return false when To
is
> an array type, as
>
> typedef int T[2];
>
> T t(e);

Yes, OK.

> is not allowed for any e. A similar argument holds for To being abstract
or
> function type.

I don't think so, a compile time error would occur if you try and
instantiate is_convertible with a abstract, function, or incomplete type,
since you cannot create objects of those types.

John Maddock
http://ourworld.compuserve.com/homepages/john_maddock/index.htm


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