Robert Jones
If you use lexical_cast to cast between identical types,eg. lexical_cast< int ( 4 );does it go through all the machinery of streaming out and back, ordoes
it short circuit? In those circumstances, does the type need
to be streamable?Thanks, Rob.
This is not a common usecase and I see only one practical use of it. Trivial conversion can be used for data normalization. But ValueType is supposed to be always normalized (or to be indistinguishable from a normalized value). In fact, I can't even give you a good example because all my ideas are based on a string representation of values, e.g. "+1" -> "1" or "(0,\t1)" -> "(0,1)". For these, you need two conversions: string -> T -> string. So, you can't optimize a general case because theoretically one can use a trivial conversion for normalization. You could optimize for well known types with no-op normalization such as integers but I don't see a practical use of it. Alex