|
Boost : |
From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2002-10-07 07:00:19
----- Original Message -----
From: "Dirk Gerrits" <dirk_at_[hidden]>
> vector<int> primes;
> set_cont( v ) += 1, 2, 3, 5, 7, 11;
>
> isn't 'really' an initialization.
> The vector gets default constructed
> first.
that's right. but the term is used in the more broad sence "to set up a
starting configuration".
> Still, the functionality seems pretty nice. But I'm personally
> not such a fan of operator overloading 'mutilation' as in the IOStreams,
> Boost.Format and your set_cont.
You're right that overloading can be misused. This is not the case here.
operator=() keeps it's normal semantics. And so does
operator +=(). Moreover, the comma separated list is really close to normal
array like initialization.
regards
Thorsten Ottosen
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk