Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

std.container.array does not work with move-only types #9849

Open
dlangBugzillaToGithub opened this issue Oct 31, 2022 · 0 comments
Open

std.container.array does not work with move-only types #9849

dlangBugzillaToGithub opened this issue Oct 31, 2022 · 0 comments
Labels
Good First Issue Issue is easy to fix, good for new contributors Severity:Enhancement

Comments

@dlangBugzillaToGithub
Copy link

gekamig511 reported this on 2022-10-31T13:27:34Z

Transfered from https://issues.dlang.org/show_bug.cgi?id=23448

Description

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)
@LightBender LightBender removed the P4 label Dec 6, 2024
@thewilsonator thewilsonator added Good First Issue Issue is easy to fix, good for new contributors and removed OS:Windows Issues Specific to Windows Arch:x86 Issues specific to x86 labels Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good First Issue Issue is easy to fix, good for new contributors Severity:Enhancement
Projects
None yet
Development

No branches or pull requests

3 participants