On 11/14/14 11:55 AM, Rainer Schuetze wrote:
On 14.11.2014 16:44, Steven Schveighoffer wrote:The issue I have is, how do you enforce that as the author of the struct?You can define "new" in the struct: struct S { new(size_t sz); int x; }
This doesn't stop array allocation, or allocation as part of a class. -Steve