
At a glance this all seems reasonable and useful, but I am sure everyone is concerned at the risk of causing collateral damage - because lexical_cast is so very, very widely used.
Can anyone wanting the new features volunteer to try out your version?
I'd like to see some other reports of successful use of this, not necessarily to test the locale features.
In my company I replaced inclusion of Lexical Cast with the file I posted here and used classic_lexical_cast where appropriate and everything seems fine. However indeed it would be better if someone else checked as well since lexical_cast may cause collateral damage. I made this change because of this in the first place (I was a victim of consequences of changing global locale when lexical_cast is widely used). And that is why I tried to make changes so that the call to lexical_cast executes the same code with except of few null pointers passed as parameters and few ifs checking (and doing nothing in result) those pointers.
Would it be wise to do this before unleashing it on trunk to make that it don't cause trouble in the nightly tests?
It likely would. However I don't know how to do that and whether I even may do that... Adam Badura