From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2004-04-05 19:18:45
"John Torjo" <john.lists_at_[hidden]> wrote in message
> Gennadiy Rozental wrote:
> >What you could do is to provide an operator += specialization for stl
> >containers and support initialization in a form:
> >init( C ) += ...
> I definitely second that.
In the very beginning it was like this. But people back then liked
the "global" operator+=() :-)
> Of course, there's an insert(c) in the library, but that works like
> insert(cont) (a)(b)(c);
> I would like:
> insert(count) += a,b,c;
then you would like operator=() too, right?
> Seems much more straightforward, and doesn't overload operator += for a
> containers, which I think could turn out to be dangerous.
Could you tell me what the "danger" is? Afterall, if the container happens
to have operator+=
it's either a compilation error or not; in the latter case you simply have
two version with different semantics.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk