Thread overview
[Issue 7145] New: Implement initializedArray in std.array
Dec 20, 2011
Andrej Mitrovic
Dec 20, 2011
Andrej Mitrovic
Dec 20, 2011
Andrej Mitrovic
December 20, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=7145

           Summary: Implement initializedArray in std.array
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Phobos
        AssignedTo: nobody@puremagic.com
        ReportedBy: andrej.mitrovich@gmail.com


--- Comment #0 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2011-12-20 10:40:45 PST ---
Created an attachment (id=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.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 20, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=7145


Andrej Mitrovic <andrej.mitrovich@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #1056|0                           |1
        is obsolete|                            |


--- Comment #1 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2011-12-20 11:16:09 PST ---
Created an attachment (id=1057)
initArray2

Rebased initArry to dsimcha's initialize() function from his std.allocator
package.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 20, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=7145



--- Comment #2 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2011-12-20 12:28:53 PST ---
Created an attachment (id=1058)
3rd version

This one adds initialization by another array's elements. Basically it's a deep-copy.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------