Mutable enums

bearophile bearophileHUGS at lycos.com
Sun Nov 13 14:54:14 PST 2011


Do you remember if this bug is in Bugzilla?


import std.algorithm;
void main() {
    enum a = [3, 1, 2];
    enum s = sort(a);
    assert(equal(a, [3, 1, 2]));
    assert(equal(s, [1, 2, 3]));
}


Bye,
bearophile


More information about the Digitalmars-d-learn mailing list