Bug 23448 – std.container.array does not work with move-only types

Status
NEW
Severity
enhancement
Priority
P4
Component
phobos
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2022-10-31T13:27:34Z
Last change time
2024-12-01T16:40:40Z
Assigned to
No Owner
Creator
Walldian
Moved to GitHub: phobos#9849 →

Comments

Comment #0 by gekamig511 — 2022-10-31T13:27:34Z
This does not compile : import std; import std.container.array; struct NoCopy { @disable this(this); } void main() { Array!NoCopy arr; } With the error : /dlang/dmd/linux/bin64/../../src/phobos/std/container/array.d(816): Error: struct `onlineapp.NoCopy` is not copyable because it has a disabled postblit /dlang/dmd/linux/bin64/../../src/phobos/std/container/array.d(825): Error: struct `onlineapp.NoCopy` is not copyable because it has a disabled postblit /dlang/dmd/linux/bin64/../../src/phobos/std/container/array.d(262): Error: struct `onlineapp.NoCopy` is not copyable because it has a disabled postblit /dlang/dmd/linux/bin64/../../src/phobos/std/container/array.d(269): Error: struct `onlineapp.NoCopy` is not copyable because it has a disabled postblit /dlang/dmd/linux/bin64/../../src/phobos/std/container/array.d(628): Error: template instance `std.container.array.RangeT!(Array!(NoCopy))` error instantiating onlineapp.d(11): instantiated from here: `Array!(NoCopy)
Comment #1 by robert.schadek — 2024-12-01T16:40:40Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/9849 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB