Boost logo

Boost :

From: Jeff Garland (jeff_at_[hidden])
Date: 2006-08-27 16:45:11


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


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk