www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22231] New: std.algorithm.mutation is missing an

https://issues.dlang.org/show_bug.cgi?id=22231

          Issue ID: 22231
           Summary: std.algorithm.mutation is missing an uninitializedCopy
                    implementation
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: jlourenco5691 gmail.com

The Phobos std.algorithm.mutation has an implementation for uninitializedFill
but it does not have one for uninitializedCopy. This function is useful for
constructing elements emplace in a target buffer using copies from a source.
Similar to uninitializedFill which falls back to fill in certain conditions,
uninitializedCopy is useful for element types that define custom copy
constructors. The result of the copy constructor would be used to construct the
element emplace in the target buffer. For all other types, it would be the same
as a plain copy.

--
Aug 21 2021