On Thursday, 13 February 2014 at 16:37:20 UTC, Andre wrote:
Hi,

could you have a look whether this is a bug with tupleof?
In case you have a const string with a default value,
the attribute is not in the tupleof list.

struct A {
        const string a = "abc";
        string d;
}

void main(){
        assert(A().tupleof.length == 2); // fails -> length = 1
}

Kind regards
André

I'm not sure. May guess is the compiler figures that you'll never be able to change a and pulls it out of the struct. What I don't know is, if it should do this without using immutable or enum.

Besides: I don't think that const elements make any sense. What do you want to do?

Reply via email to