dmd 1.070 and 2.055 release

Walter Bright newshound2 at digitalmars.com
Sun Sep 11 10:57:12 PDT 2011


On 9/11/2011 9:08 AM, Max Samukha wrote:
> This test case
>
> struct 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!


More information about the Digitalmars-d-announce mailing list