From: Andy Little (andy_at_[hidden])
Date: 2006-01-30 07:13:01
"John Maddock" <john_at_[hidden]> wrote in message
>> BTW would there be any point in an is_implicitly_convertible<A,B>
> That's what is_convertible does now: tests for implicit convertibility.
> There's no way you can test for other kinds of valid (but explicit)
> conversions I believe.
Oops sorry for being too lazy to try that out before posting. Perhaps it would
be useful to put that in the documentation for implicit_cast e.g
implicit_cast<t>(S) will succeed wherever is_convertible<S,T>::value ==true and
will cause a compile time error wherever implicit_cast<t>(S) will succeed
wherever is_convertible<S,T>::value ==false. Maybe could even do the reverse too
if implicit_cast was documented.
BTW Its a real pain that the parameter order for is_convertible isnt the other
way round IMO. Its confusing and error prone because casts go the other way. Is
there a reason for it?
Getting back to the original topic (or trying to anyway ).. So is the
documentation I provided for implicit_cast useful?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk