PhobosWatch: manifest => enum

Janice Caron caron800 at googlemail.com
Fri Dec 28 12:19:01 PST 2007


On 12/28/07, Steven Schveighoffer <schveiguy at yahoo.com> wrote:
> struct S { char[] str};
>
> const S x = S("hello".dup);
> auto y = x;
>
> If y is not const, then y.str is not const, yet it points to the same data
> as x.

Yeah, you're right.

But doesn't the same problem occur with

    enum { S x = S("hello".dup); }
    auto y = x;

?



More information about the Digitalmars-d mailing list