Boost logo

Boost :

From: Thomas Matelich (sosedada_at_[hidden])
Date: 2000-08-22 09:23:42


Karl Nelson wrote:

> This isn't a dark place, but rather just a bit of ambiguity.
> My current implementation used two formats in a row to mean
> "dump current and use this one". However, that functionality
> could be dumped in place of the other meaning. Also one would have
> to ask is the current behavior that extra arguments are placed
> in the stream appropriate as well.
>
> cout << format("%d %d") << i << j << format("%d %d") << k << l;
>
> (is the second format bad because the first one forgot the endf
> or should the second flow to the first?)

I just got scared with this method. The biggest problem I'm seeing here is a
global state. What if I'm in a multithreaded situation? I realize I'm going to
have problems writing to the same stream from two different threads, but would
this maintain a different state for each stream? I didn't look at the code so my
concern may be unfounded.

--
Thomas O Matelich
Senior Software Designer
Zetec, Inc.
sosedada_at_[hidden]
tmatelich_at_[hidden]

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