initializer list like in C++?

Chris Nicholson-Sauls ibisbasenji at gmail.com
Tue Jul 24 06:23:00 PDT 2007


Hoenir wrote:
> Is there anything like the initializer list (C++) in D?
> 
> class Test {
>     int x;
>     Test(int y):x(y){};
> }

class Test {
     int x ;
     this (int y) { x = y; }
}

;)  Or in short: no.  Not that I've ever missed it at all.

-- Chris Nicholson-Sauls


More information about the Digitalmars-d-learn mailing list