
27 Aug
2006
27 Aug
'06
8:45 p.m.
Peter Dimov wrote:
Jeff Garland wrote:
The current lexical_cast makes no claim of thread safety so why would you expect an optimization to?
The default level of thread safety shall always be "basic", and since lexical_cast has no state, this means that it should be usable in a threaded program without explicit synchronization.
Components wouldn't be able to use lexical_cast for fear of stepping on each other's toes otherwise.
They can't. lexical_cast uses iostreams which has global data like the global locale and no guarantee of "thread safety" w.r.t to this global state. Jeff