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 dcfc4b35 was             9c14ae9, checked in by Rob Schluntz <rschlunt@…>, 9 years ago | 
        
          | 
add thesis source
 | 
        
          | 
              
Property                 mode
 set to                 100644 | 
        
          | File size:
            443 bytes | 
      
      
| Line |  | 
|---|
| 1 | struct __ignore_t__ { | 
|---|
| 2 | }; | 
|---|
| 3 | __ignore_t__ __ignore__; | 
|---|
| 4 |  | 
|---|
| 5 | forall(dtype T | sized(T)) | 
|---|
| 6 | __ignore_t__ ?=?(__ignore_t__ * dst, T src) { | 
|---|
| 7 | return *dst; | 
|---|
| 8 | } | 
|---|
| 9 |  | 
|---|
| 10 | forall(dtype T | sized(T) | { void ?{}(T *, T); }) | 
|---|
| 11 | T ?=?(T * dst, __ignore_t__ src) { | 
|---|
| 12 | return *dst; | 
|---|
| 13 | } | 
|---|
| 14 |  | 
|---|
| 15 | int main() { | 
|---|
| 16 | int x = 123, y = 456, z = 789; | 
|---|
| 17 | double j = 3.14, i = 8.77; | 
|---|
| 18 | [x, __ignore__, z] = [y, z, x]; | 
|---|
| 19 | [i, j, __ignore__] = [0, i, j]; | 
|---|
| 20 | printf("%d %d %d\n", x, y, z); | 
|---|
| 21 | printf("%g %g\n", i, j); | 
|---|
| 22 | } | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.