Using non-copyable types

Yuxuan Shui yshuiv7 at gmail.com
Thu May 23 18:05:41 UTC 2019


When I try to use non-copyable types, I just get all sorts of 
resistance from the standard library.

For example, most of the std.range functions assume the range is 
copyable. std.typecons.Tuple assume all of its types are copyable.

I tried to use the new copy constructor feature to make a wrapper 
that moves by default. But apparently copy constructors are 
ignored when postblit is disabled.

How can we make using non-copyable types easier?


More information about the Digitalmars-d mailing list