ADT
        aaron-thesis
        arm-eh
        ast-experimental
        cleanup-dtors
        deferred_resn
        demangler
        enum
        forall-pointer-decay
        jacob/cs343-translation
        jenkins-sandbox
        new-ast
        new-ast-unique-expr
        new-env
        no_list
        persistent-indexer
        pthread-emulation
        qualifiedEnum
        resolv-new
        with_gc
      
      
        
          | 
            Last change
 on this file since 2f0fc56 was             9c14ae9, checked in by Rob Schluntz <rschlunt@…>, 9 years ago           | 
        
        
          | 
             
add thesis source 
 
           | 
        
        
          
            
              - 
Property                 mode
 set to                 
100644
               
             
           | 
        
        
          | 
            File size:
            286 bytes
           | 
        
      
      
| Line |   | 
|---|
| 1 | forall(dtype T | sized(T)) T * malloc(void);
 | 
|---|
| 2 | 
 | 
|---|
| 3 | forall(dtype T, ttype Params | sized(T) | { void ?{}(T *, Params); })
 | 
|---|
| 4 | T * new(Params p) {
 | 
|---|
| 5 |   return ((T*)malloc()){ p }; // construct result of malloc
 | 
|---|
| 6 | }
 | 
|---|
| 7 | 
 | 
|---|
| 8 | struct S { int x, y; }; 
 | 
|---|
| 9 | void ?{}(S *, int, int);
 | 
|---|
| 10 | 
 | 
|---|
| 11 | int main() {
 | 
|---|
| 12 |   S * s = new(3, 4);
 | 
|---|
| 13 | }
 | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.