Changes in src/tests/memberCtors.c [72f85de:2afec66]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/tests/memberCtors.c
r72f85de r2afec66 22 22 } 23 23 24 /* WrappedInt */void ?=?(WrappedInt & this, int x) {24 void ?=?(WrappedInt & this, int x) { 25 25 printf("assigning int: %d %d\n", this.x, x); 26 26 this.x = x; 27 // return this;28 27 } 29 30 // WrappedInt ?=?(WrappedInt & this, WrappedInt other) {31 // printf("assigning int: %d %d\n", this.x, other.x);32 // this.x = other.x;33 // return this;34 // }35 28 36 29 struct A { … … 86 79 87 80 void ^?{}(B & b) { 88 printf("begin destruct B\n");89 81 b.a2 = (A) { 0 }; 90 82 ^(b.a1){}; 91 printf("end destruct B\n");92 83 } // a2, a3 never destructed - will be automatically destructed 93 84 94 85 int main() { 95 86 printf("Before declaration of b1\n"); 96 B b1; // b1 = { { 1000, 0, 0 }, { 1001, 0, 0 }, { 0, 0, 0 } }87 B b1; 97 88 printf("Before declaration of b2\n"); 98 89 B b2 = b1;
Note: See TracChangeset
for help on using the changeset viewer.