Changeset dafbde8 for tests/zombies/it_out.c
- Timestamp:
- Jan 20, 2021, 4:49:40 PM (3 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 454f478
- Parents:
- 92bfda0 (diff), fd54fef (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 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/zombies/it_out.c
r92bfda0 rdafbde8 16 16 typedef unsigned long streamsize_type; 17 17 18 trait ostream( dtype os_type) {18 trait ostream( os_type & ) { 19 19 os_type *write( os_type *, const char *, streamsize_type ); 20 20 int fail( os_type * ); 21 21 }; 22 22 23 trait writeable( otypeT ) {24 forall( dtype os_type| ostream( os_type ) ) os_type * ?<<?( os_type *, T );23 trait writeable( T ) { 24 forall( os_type & | ostream( os_type ) ) os_type * ?<<?( os_type *, T ); 25 25 }; 26 26 27 forall( dtype os_type| ostream( os_type ) ) os_type * ?<<?( os_type *, char );28 forall( dtype os_type| ostream( os_type ) ) os_type * ?<<?( os_type *, int );29 forall( dtype os_type| ostream( os_type ) ) os_type * ?<<?( os_type *, const char * );27 forall( os_type & | ostream( os_type ) ) os_type * ?<<?( os_type *, char ); 28 forall( os_type & | ostream( os_type ) ) os_type * ?<<?( os_type *, int ); 29 forall( os_type & | ostream( os_type ) ) os_type * ?<<?( os_type *, const char * ); 30 30 31 trait istream( dtype is_type) {31 trait istream( is_type & ) { 32 32 is_type *read( is_type *, char *, streamsize_type ); 33 33 is_type *unread( is_type *, char ); … … 36 36 }; 37 37 38 trait readable( otypeT ) {39 forall( dtype is_type| istream( is_type ) ) is_type * ?<<?( is_type *, T );38 trait readable( T ) { 39 forall( is_type & | istream( is_type ) ) is_type * ?<<?( is_type *, T ); 40 40 }; 41 41 42 forall( dtype is_type| istream( is_type ) ) is_type * ?>>?( is_type *, char* );43 forall( dtype is_type| istream( is_type ) ) is_type * ?>>?( is_type *, int* );42 forall( is_type & | istream( is_type ) ) is_type * ?>>?( is_type *, char* ); 43 forall( is_type & | istream( is_type ) ) is_type * ?>>?( is_type *, int* ); 44 44 45 trait iterator( otype iterator_type, otypeelt_type ) {45 trait iterator( iterator_type, elt_type ) { 46 46 iterator_type ?++( iterator_type* ); 47 47 iterator_type ++?( iterator_type* ); … … 52 52 }; 53 53 54 forall( otypeelt_type | writeable( elt_type ),55 otypeiterator_type | iterator( iterator_type, elt_type ),56 dtype os_type| ostream( os_type ) )54 forall( elt_type | writeable( elt_type ), 55 iterator_type | iterator( iterator_type, elt_type ), 56 os_type & | ostream( os_type ) ) 57 57 void write_all( iterator_type begin, iterator_type end, os_type *os ); 58 58 59 forall( otypeelt_type | writeable( elt_type ),60 otypeiterator_type | iterator( iterator_type, elt_type ),61 dtype os_type| ostream( os_type ) )59 forall( elt_type | writeable( elt_type ), 60 iterator_type | iterator( iterator_type, elt_type ), 61 os_type & | ostream( os_type ) ) 62 62 void write_all( elt_type begin, iterator_type end, os_type *os ) { 63 63 os << begin;
Note: See TracChangeset
for help on using the changeset viewer.