[Issue 16117] New: std.experimental.alloctor does not work with non default constructible types
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Fri Jun 3 05:21:52 PDT 2016
https://issues.dlang.org/show_bug.cgi?id=16117
Issue ID: 16117
Summary: std.experimental.alloctor does not work with non
default constructible types
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: normal
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: maikklein at googlemail.com
See https://forum.dlang.org/post/rldrgatyapcmsklupkke@forum.dlang.org for more
information
Test case:
import std.experimental.allocator;
struct Foo{
@disable this();
}
auto foos = theAllocator.makeArray!Foo(100);
Error messsage:
../../.dub/packages/experimental_allocator-2.70.0-b1/src/std/experimental/allocator/package.d(576,34):
Error: variable
std.experimental.allocator.uninitializedFillDefault!(Foo).uninitializedFillDefault.t
default construction is disabled for type immutable(Foo)
../../.dub/packages/experimental_allocator-2.70.0-b1/src/std/experimental/allocator/package.d(612,36):
Error: template instance
std.experimental.allocator.uninitializedFillDefault!(Foo) error instantiating
source/breeze/util/algebraic.d(91,43): instantiated from here:
makeArray!(Foo, IAllocator)
--
More information about the Digitalmars-d-bugs
mailing list