On 2011-03-03 01:42:18 -0500, Tom t...@nospam.com said:
I have...
int main(string[] args) {
auto s1 = f(); // MH MH
auto s2 = g(); // OK
s2.c = null; // OK
return 0;
}
I think the compiler complains because the s1.c member is not
assignable (since it is
I have...
int main(string[] args) {
auto s1 = f(); // MH MH
auto s2 = g(); // OK
s2.c = null; // OK
return 0;
}
class C {}
struct StructWithConstMember {
this(int i, C c) { this.i=i; this.c=c; }
int i;
const(C) c;
}
struct
On 03/02/2011 10:42 PM, Tom wrote:
I have...
int main(string[] args) {
auto s1 = f(); // MH MH
auto s2 = g(); // OK
s2.c = null; // OK
return 0;
}
class C {}
struct StructWithConstMember {
this(int i, C c) { this.i=i; this.c=c; }
int i;
const(C) c;
}
struct StructWithoutConstMember {
El 03/03/2011 03:47, Ali Çehreli escribió:
On 03/02/2011 10:42 PM, Tom wrote:
I have...
int main(string[] args) {
auto s1 = f(); // MH MH
auto s2 = g(); // OK
s2.c = null; // OK
return 0;
}
class C {}
struct StructWithConstMember {
this(int i, C c) { this.i=i; this.c=c; }
int i;
const(C) c;
On Wednesday 02 March 2011 22:42:18 Tom wrote:
I have...
int main(string[] args) {
auto s1 = f(); // MH MH
auto s2 = g(); // OK
s2.c = null; // OK
return 0;
}
class C {}
struct StructWithConstMember {
this(int i, C c) { this.i=i; this.c=c; }
int