ADT
        arm-eh
        ast-experimental
        cleanup-dtors
        enum
        forall-pointer-decay
        jacob/cs343-translation
        jenkins-sandbox
        new-ast
        new-ast-unique-expr
        pthread-emulation
        qualifiedEnum
      
      
        
          | Last change
 on this file since deca0f5 was             67982887, checked in by Peter A. Buhr <pabuhr@…>, 7 years ago | 
        
          | 
specialize thesis directory-names
 | 
        
          | 
              
Property                 mode
 set to                 100644 | 
        
          | File size:
            322 bytes | 
      
      
| Line |  | 
|---|
| 1 | struct T { | 
|---|
| 2 | int x; | 
|---|
| 3 | }; | 
|---|
| 4 | const int val = 12223344; | 
|---|
| 5 | void ?{}(T * t) { | 
|---|
| 6 | if (t->x == val) printf("uh-oh, constructed twice!\n"); | 
|---|
| 7 | t->x = val; | 
|---|
| 8 | } | 
|---|
| 9 |  | 
|---|
| 10 | struct S { | 
|---|
| 11 | T t1, t2; | 
|---|
| 12 | }; | 
|---|
| 13 |  | 
|---|
| 14 | void ?{}(S * this) { | 
|---|
| 15 | // construct both members | 
|---|
| 16 | } | 
|---|
| 17 |  | 
|---|
| 18 | void ?{}(S * this, int x) { | 
|---|
| 19 | // forward | 
|---|
| 20 | ?{}(this); | 
|---|
| 21 | ?{}(&this->t1); | 
|---|
| 22 | } | 
|---|
| 23 |  | 
|---|
| 24 | int main() { | 
|---|
| 25 | S s = 5; | 
|---|
| 26 | } | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.