
Kevlin Henney <kevlin@curbralan.com> writes:
Information loss is not the deciding criterion for whether a conversion is narrowing or widening :-)
Another distinction that needs to be made is that not all conversions fit into the widening/narrowing model. Some conversions are better considered as reinterpreting or translating conversions (eg lexical_cast and reinterpret_cast). These are useful where some notion of subtyping is not applicable, eg between int and string, as opposed to where one is, eg between numeric types.
I'm sympathetic to the idea that any should use implicit conversions, but, really, are you saying that any has a subtype relationship with everything it can hold? If it did, then we could use any_cast on any argument type, right? -- Dave Abrahams Boost Consulting www.boost-consulting.com