Changeset ae63a18 for src/examples/iostream.h
- Timestamp:
- Dec 18, 2015, 2:56:11 PM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
- Children:
- 8762501
- Parents:
- baf7fee (diff), c23f807 (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
-
src/examples/iostream.h
rbaf7fee rae63a18 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Nov 19 17:56:51201513 // Update Count : 512 // Last Modified On : Mon Nov 23 14:15:25 2015 13 // Update Count : 17 14 14 // 15 15 … … 27 27 28 28 context writeable( type T ) { 29 forall( dtype ostype | ostream( ostype ) ) ostype * ? <<?( ostype *, T );29 forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, T ); 30 30 }; 31 31 32 32 // implement writable for some intrinsic types 33 33 34 forall( dtype ostype | ostream( ostype ) ) ostype * ?<<?( ostype *, char ); 35 forall( dtype ostype | ostream( ostype ) ) ostype * ?<<?( ostype *, int ); 36 forall( dtype ostype | ostream( ostype ) ) ostype * ?<<?( ostype *, double ); 37 forall( dtype ostype | ostream( ostype ) ) ostype * ?<<?( ostype *, const char * ); 38 forall( dtype ostype | ostream( ostype ) ) ostype * ?<<?( ostype *, void * ); 34 forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, char ); 35 forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, int ); 36 forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, double ); 37 forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, const char * ); 38 forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, const void * ); 39 40 forall( dtype ostype, dtype retostype | ostream( ostype ) | ostream( retostype ) ) retostype * ?|?( ostype *os, retostype * (* manip)(ostype*) ); 41 forall( dtype ostype | ostream( ostype ) ) ostype * endl( ostype * ); 39 42 40 43 // writes the range [begin, end) to the given stream … … 49 52 void write_reverse( iterator_type begin, iterator_type end, os_type *os ); 50 53 54 //****************************************************************************** 51 55 52 56 context istream( dtype istype ) { … … 58 62 59 63 context readable( type T ) { 60 forall( dtype istype | istream( istype ) ) istype * ? <<?( istype *, T );64 forall( dtype istype | istream( istype ) ) istype * ?|?( istype *, T ); 61 65 }; 62 66 63 67 forall( dtype istype | istream( istype ) ) 64 istype * ? >>?( istype *, char * );68 istype * ?|?( istype *, char * ); 65 69 66 70 forall( dtype istype | istream( istype ) ) 67 istype * ? >>?( istype *, int * );71 istype * ?|?( istype *, int * ); 68 72 69 73 #endif // IOSTREAM_H
Note: See TracChangeset
for help on using the changeset viewer.