"John Maddock" <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]: 

> The problem is that the question "is A convertible to B" has four
> answers: yes, no, ill-formed, and ambiguous :-(
> 
> John.

Obviously, I think there should be only two :)  That is, it would be nice 
to have a test that tells me the whether or not an assignment would or 
would not succeed. If I want to assign the result of an expression to a 
variable (or use it as a return value, etc), I don't particularly care WHY 
an assignment would fail.  I just want to know whether it would or not. 

Perhaps it would be useful to have a set of tests that can tell you whether 
a conversion would fail for a specific reason, eg, conversion_is_ambiguous
<X,Y>.

But the real problem, as I see it, is that is_convertible<X,Y> can fail to 
compile for certain choices of X and Y.  That defeats the purpose of the 
test -- why would I ask if I can convert an X to a Y if I must already know 
the answer to do so safely?

-- 
Mike Conley


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

Reply via email to