[Issue 22231] New: std.algorithm.mutation is missing an uninitializedCopy implementation
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Aug 21 15:40:55 UTC 2021
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 at puremagic.com
Reporter: jlourenco5691 at 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.
--
More information about the Digitalmars-d-bugs
mailing list