Boost logo

Boost :

From: Rob Stewart (stewart_at_[hidden])
Date: 2004-07-09 17:24:39


From: brangdon_at_[hidden] (Dave Harris)
> stewart_at_[hidden] (Rob Stewart) wrote (abridged):
> > I overstated the case. How many types will one have to overload
> > operator<< (and operator>>) for? The combinatorial explosion
> > (containers X types to use with the initialization library X 2)
> > will be overwhelming.
>
> You've lost me. Why does the choice of operator<<() instead of operator,()
> produce a combinatorial explosion of overloads? It's mostly just a change
> of name.

I lost myself, it would seem. When I was thinking that, I wasn't
paying enough attention to the subject at hand and was thinking
in terms not of the initialization library but of global
operators.

As you say, it's merely a change in operator. Also, the
implication of your idea to overload operator<<, that overloading
an operator for which the evaluation order doesn't change because
you've overloaded it, is probably wise.

> > I still think of operator<< and operator>> as doing formatted I/O.
>
> Well, at one time we all thought it did bitwise shifts.

How true.

-- 
Rob Stewart                           stewart_at_[hidden]
Software Engineer                     http://www.sig.com
Susquehanna International Group, LLP  using std::disclaimer;

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