On 9/11/2011 9:08 AM, Max Samukha wrote:
This test casestruct S { @disable this(); this(int x) { } } class C { S s; this() { s = S(42); } } void main() { auto c = new C; } yields Error: default construction is disabled for type C Is it a bug?
No, it's a feature!
