Changeset 90152a4 for tests/swap.c
- Timestamp:
- Aug 27, 2018, 4:40:34 PM (7 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- b7c89aa
- Parents:
- f9feab8 (diff), 305581d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - File:
-
- 1 moved
-
tests/swap.c (moved) (moved from src/tests/swap.c ) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tests/swap.c
rf9feab8 r90152a4 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // swap.c -- 7 // swap.c -- 8 8 // 9 9 // Author : Peter A. Buhr 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Aug 23 20:34:45201713 // Update Count : 7 012 // Last Modified On : Thu Dec 7 09:13:13 2017 13 // Update Count : 71 14 14 // 15 15 16 #include <fstream >17 #include <stdlib > // swap16 #include <fstream.hfa> 17 #include <stdlib.hfa> // swap 18 18 19 19 int main( void ) { … … 84 84 85 85 struct S { int i, j; } s1 = { 1, 2 }, s2 = { 2, 1 }; 86 ofstream * ?|?( ofstream *os, S s ) { return os | s.i | s.j; }86 ofstream & ?|?( ofstream & os, S s ) { return os | s.i | s.j; } 87 87 sout | "struct S\t\t" | s1 | "," | s2 | "\t\tswap "; 88 88 swap( s1, s2 );
Note:
See TracChangeset
for help on using the changeset viewer.