
lexical_cast(Source const&, Target const& =Target())
No, that kind of implementation seems unacceptable to me. I want lexical_cast to throw exceptions just as often as I don't want it to. And, of course, I'm against introducing a breaking change.
or most likely a completely independent overload
lexical_cast(Source const&, Target const&)
That would be my preferred way to implement this extension.
Yes, agreed. That the only IMHO way to implement that "extension" -- without disturbing the existing lexical_cast. I threw the first one in almost accidently. Kevlin argued (in a separate discussion) that lexical_cast<Foo>(string) lexical_cast(string, some_foo) were distant syntactically and I argued that they were not as they could in fact be two "sides" of the same "coin" lexical_cast(Source const&, Target const& =Target()) Then, I brought it to this thread just to confuse things. V.