On 04/17/2012 02:00 PM, simendsjo wrote:

> Sounds like a bug. C style initializers work in other cases:

I try not to use them. I think they have this 'feature' of leaving unspecified members uninitialized:

struct S
{
    int i;
    double d;
}

void main()
{
    S s = { 42 };               // <-- no initializer for S.d
    assert(s.i == 42);
    assert(s.d == double.nan);  // <-- fails (may work for you)
}

Is that a bug or a feature? I might have opened it but I don't remember now. :)

Ali

Reply via email to