|
Boost : |
From: Andras Erdei (ccg_at_[hidden])
Date: 2004-07-09 12:42:43
On Fri, 9 Jul 2004 09:12:53 -0700, "Andrei Alexandrescu (See Website for Email)" <andrewalex_at_[hidden]> wrote:
>> >> Or maybe we should just use
>> >>
>> >> int cv[] = { 1, 2, 3 };
>> >> v.assign( cv, end(cv) );
>That's cool. Then, what is the motivation of the initialization library?
in my experience i have to initialize STL containers
only in extremely rare cases, so i don't need an
initialization library, but if something allows me
to write it in a way that resembles initialization i
still want it -- because it's cool :O)
my two cents on the operator debate:
- people who know that "," is a sequence point will not
get bitten by it, as they also tend to know that an
overloaded "," is not a sequence point; and if they do
get bitten, they deserve it -- library authors should
know better, application developers intentionally
relying on evaluation order are evil
- people who don't know what a sequence point is theoretically
will get bitten regardless of which operator is used here,
and practically will not get bitten, not more frequently
than in any other part of their code with any other operator
(built-in or user-defined)
imho the coding guideline was never valid, and operator "," is the
best choice here
br,
andras
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk