May 07, 2012 Re: Const/Shared/Immutable anomalies in D that should be fixed | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Mehrdad | On Sun, 06 May 2012 10:37:48 -0400, Mehrdad <wfunction@hotmail.com> wrote:
> I think you misread my question.
>
> I was asking about declaring a STRUCT as const, not a VARIABLE as
> const.
I missed this part of the question. If you haven't got an answer yet...
const or invariant (or shared) applied to a struct is like applying it to every member of the struct. I think that's in the spec somewhere.
-Steve
| |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply