Array literals' default type

Phil Deets pjdeets2 at gmail.com
Mon Oct 12 09:42:31 PDT 2009


On Mon, 12 Oct 2009 09:47:34 -0500, Don <nospam at nospam.com> wrote:

> (OTOH I wonder how much extant C++ code uses the comma operator. I bet  
> there's not much of it. (But more than code than uses octal!)).

Boost Assign uses the comma operator.  
http://www.boost.org/doc/libs/1_40_0/libs/assign/doc/index.html#operator+=

However, the C++ code

vector<int> values;
values += 1,2,3,4,5,6,7,8,9;

could be translated to

int[] values;
values ~= [1,2,3,4,5,6,7,8,9];

in D so no comma operator would be needed there.


-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/



More information about the Digitalmars-d mailing list