lexical cast and locale

This might be a stupid question but I couldn't find anything in the documentation about it. How do I control the locale used in lexical cast? More specificly I want to control the decimal separator.

On Fri, 30 Jul 2004 09:43:49 +0000 (UTC), Martin <adrianm@touchdown.se> wrote:
This might be a stupid question but I couldn't find anything in the documentation about it.
How do I control the locale used in lexical cast?
More specificly I want to control the decimal separator.
You can't control formatting. That's basically the main fact about lexical_cast; it's a simple facility for simple tasks. You might find the following discussion interesting: http://google.com/groups?threadm=d6651fb6.0301060705.3d085661%40posting.goog... [TinyURL version: http://tinyurl.com/3qluw ] (look at the subthread that starts from James Kanze's post dated 6-gen-2003) -- Genny.

You can't control formatting. That's basically the main fact about lexical_cast; it's a simple facility for simple tasks.
But I don't want to control formatting. I just want to convert a text (e.g. "3.14") to a number in a way that works even if the locale is set to decimal comma. Isn't that a simple task?
participants (2)
-
Gennaro Prota
-
Martin