Boost logo

Boost :

From: Stewart, Robert (stewart_at_[hidden])
Date: 2002-01-29 08:07:06


From: James Kanze [SMTP:kanze_at_[hidden]]
>
> "Stewart, Robert" <stewart_at_[hidden]> writes:
>
> [...]
> |> It's a little easier to see the <<'s in the second statement than
> |> the %'s in the first. Unfortunately, using "<<" introduces problems
> |> interacting with streams,
>
> Is this from experience, or simply speculation? I was worried about the

That's from empirical observation of the examples in the thread. I looked
at various examples in the various formats and made observations from what I
saw. That's not speculation, but it's not experience either.

> |> and suggests that the insertion operators already defined for
> |> various types would work with format, so it isn't a good choice.
>
> And why don't the insertion oeprators already defined for various types
> work with format? I would have thought that that would be one of the
> essential requirements.

The format object isn't a stream, so it doesn't act like one, thus the
insertion operators can't distinguish between application to a format object
or the stream. That means that an insertion operation may apply to a format
object when meant for the stream or vice versa. (Efforts to make the format
object act like a stream have been stymied in various ways; it doesn't
appear to be technically possible.)

Rob
Susquehanna International Group, LLP
http://www.sig.com


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