this(this) must be cheap and O(1)

Trass3r un at known.com
Sat Sep 24 04:30:56 PDT 2011


> This means that objects with large state would need to use things like 
> COW and/or reference counting.

Isn't an expensive-to-copy type supposed to be a class anyway?

> I'd go as far as requiring this(this) to be nothrow, but perhaps it 
> would be best to see whether that is a necessity.

Don't memory allocations prevent a function from being nothrow?
Then this would make it impossible to properly wrap an array in a struct.


More information about the Digitalmars-d mailing list