Immutable static arrays
H. S. Teoh
hsteoh at quickfur.ath.cx
Fri Mar 16 22:05:52 PDT 2012
On Sat, Mar 17, 2012 at 03:51:01PM +1100, Daniel Murphy wrote:
> "H. S. Teoh" <hsteoh at quickfur.ath.cx> wrote in message
> news:mailman.806.1331959335.4860.digitalmars-d at puremagic.com...
> >
> > Argh. So I have to hack around this by casting an immutable static
> > array key into a mutable one inside the AA? (Which should work, I
> > suppose, because a copy is being made.) Or should I just leave this
> > alone for now and wait for dmd to be fixed?
> >
> >
>
> I think the bug only applies to the constructor.
>
> Up to you. If you use a workaround, try and put a static assert in that
> will fail when the bug's fixed.
[...]
Cool, that's an excellent way to remind oneself to change the code after
the bug is fixed! :-)
T
--
Many open minds should be closed for repairs. -- K5 user
More information about the Digitalmars-d
mailing list