Last change
on this file since b28ce93 was dfe8f78, checked in by Andrew Beach <ajbeach@…>, 8 months ago |
Getting the reproduction of every trac ticket in the repository looks to be a bit much, but here is the other critical ticket and another one I did quickly.
|
-
Property mode
set to
100644
|
File size:
528 bytes
|
Line | |
---|
1 | // Trac ticket
|
---|
2 | // https://cforall.uwaterloo.ca/trac/ticket/238
|
---|
3 |
|
---|
4 | #include <stdlib.hfa>
|
---|
5 | #include <fstream.hfa>
|
---|
6 |
|
---|
7 | struct cluster {};
|
---|
8 | void ?{}(cluster & this) { sout | "Cluster Ctor"; }
|
---|
9 | void ?{}(cluster & this, cluster ) { sout | "Cluster CopyCtor"; }
|
---|
10 |
|
---|
11 | struct inner {
|
---|
12 | cluster * cl;
|
---|
13 | };
|
---|
14 | void ?{}(inner & this, cluster & ) { sout | "Inner Ctor"; }
|
---|
15 |
|
---|
16 | struct outer {
|
---|
17 | inner * in;
|
---|
18 | };
|
---|
19 | void ?{}(outer & this, cluster & cl ) {
|
---|
20 | this.in = new(cl);
|
---|
21 | }
|
---|
22 | void ^?{}(outer & this) { delete(this.in); }
|
---|
23 |
|
---|
24 | int main() {
|
---|
25 | cluster cl;
|
---|
26 | outer o = { cl };
|
---|
27 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.