Re: inferred vs. annotated attributes

2016-09-10 Thread ag0aep6g via Digitalmars-d-learn
On 09/10/2016 10:23 AM, Q. Schroll wrote: Is there a difference between inferred and annotated attributes? Example: struct X(T) { this(S)(in S[] arr) // inferred pure { } } void main() pure { X!uint mut = [ 1, 2 ]; // proves inference (cf. main is pur

Re: inferred vs. annotated attributes

2016-09-10 Thread Q. Schroll via Digitalmars-d-learn
On Saturday, 10 September 2016 at 09:38:15 UTC, Lodovico Giaretta wrote: On Saturday, 10 September 2016 at 08:23:35 UTC, Q. Schroll wrote: Is there a difference between inferred and annotated attributes? Example: struct X(T) { this(S)(in S[] arr) // inferred pure { }

Re: inferred vs. annotated attributes

2016-09-10 Thread Lodovico Giaretta via Digitalmars-d-learn
On Saturday, 10 September 2016 at 08:23:35 UTC, Q. Schroll wrote: Is there a difference between inferred and annotated attributes? Example: struct X(T) { this(S)(in S[] arr) // inferred pure { } } void main() pure { X!uint mut = [ 1, 2 ]; // proves in

inferred vs. annotated attributes

2016-09-10 Thread Q. Schroll via Digitalmars-d-learn
Is there a difference between inferred and annotated attributes? Example: struct X(T) { this(S)(in S[] arr) // inferred pure { } } void main() pure { X!uint mut = [ 1, 2 ]; // proves inference (cf. main is pure) // immutable X!uint imm1 = [ 1