Comment #0 by andrej.mitrovich — 2011-12-20T10:40:45Z
Created attachment 1056
initArray
It would be nice to have an initializedArray function, which
creates and initializes an arbitrarily-sized array with a *specific*
initializer. An implementation is provided in the attachment.
Comment #1 by andrej.mitrovich — 2011-12-20T11:16:09Z
Created attachment 1057
initArray2
Rebased initArry to dsimcha's initialize() function from his std.allocator package.
Comment #2 by andrej.mitrovich — 2011-12-20T12:28:53Z
Created attachment 1058
3rd version
This one adds initialization by another array's elements. Basically it's a deep-copy.
Comment #3 by andrej.mitrovich — 2016-08-27T22:24:51Z
Hmm.. I'm not sure about the use-case of this. It combines some stuff with an optional allocator but that should ideally be part of the new allocator stuff in the works by Andrei.
The provided example implementation isn't very noteworthy though. Closing this.