April 07, 2009 Re: Array Appenders | ||||
|---|---|---|---|---|
| ||||
Andrei Alexandrescu: > Denis Koroskin wrote: > > void append(T)(T[] array, ref size_t index, T value) > I'm pretty sure you meant to pass array by reference. AH, that's the bug of mine I was talking about here: http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=87301 Bye, bearophile | ||||
April 07, 2009 Re: Array Appenders | ||||
|---|---|---|---|---|
| ||||
Posted in reply to bearophile | bearophile wrote: > Andrei Alexandrescu: >> Denis Koroskin wrote: >>> void append(T)(T[] array, ref size_t index, T value) >> I'm pretty sure you meant to pass array by reference. > > AH, that's the bug of mine I was talking about here: > http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=87301 Never happened to me. Anyway, finally introducing different types for slices and resizeable arrays could fix this. Just make it so that a resizable array is always passed by reference. Slices can stay the way they are. > Bye, > bearophile | |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply