Containers with non copyable types

maik klein via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Feb 1 12:37:12 PST 2016


For example it is no problem in C++ to have

std::vector<std::unique_ptr<foo>> vuf;

But how can this be expressed in D?

For example

Array!(Unique!int) ua;

doesn't compile because it requires this(this) which is obviously 
disabled for "Unique".




More information about the Digitalmars-d-learn mailing list