Changeset 3ce0d440 for src/libcfa/iostream
- Timestamp:
- Jun 2, 2018, 10:00:29 AM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, with_gc
- Children:
- 428bef8
- Parents:
- d56cc219
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/iostream
rd56cc219 r3ce0d440 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Apr 28 13:08:24201813 // Update Count : 15 212 // Last Modified On : Sat Jun 2 08:07:55 2018 13 // Update Count : 153 14 14 // 15 15 … … 56 56 // implement writable for intrinsic types 57 57 58 forall( dtype ostype | ostream( ostype ) ) ostype & ?|?( ostype &, _Bool ); 58 forall( dtype ostype | ostream( ostype ) ) { 59 ostype & ?|?( ostype &, _Bool ); 59 60 60 forall( dtype ostype | ostream( ostype ) )ostype & ?|?( ostype &, char );61 forall( dtype ostype | ostream( ostype ) )ostype & ?|?( ostype &, signed char );62 forall( dtype ostype | ostream( ostype ) )ostype & ?|?( ostype &, unsigned char );61 ostype & ?|?( ostype &, char ); 62 ostype & ?|?( ostype &, signed char ); 63 ostype & ?|?( ostype &, unsigned char ); 63 64 64 forall( dtype ostype | ostream( ostype ) )ostype & ?|?( ostype &, short int );65 forall( dtype ostype | ostream( ostype ) )ostype & ?|?( ostype &, unsigned short int );66 forall( dtype ostype | ostream( ostype ) )ostype & ?|?( ostype &, int );67 forall( dtype ostype | ostream( ostype ) )ostype & ?|?( ostype &, unsigned int );68 forall( dtype ostype | ostream( ostype ) )ostype & ?|?( ostype &, long int );69 forall( dtype ostype | ostream( ostype ) )ostype & ?|?( ostype &, long long int );70 forall( dtype ostype | ostream( ostype ) )ostype & ?|?( ostype &, unsigned long int );71 forall( dtype ostype | ostream( ostype ) )ostype & ?|?( ostype &, unsigned long long int );65 ostype & ?|?( ostype &, short int ); 66 ostype & ?|?( ostype &, unsigned short int ); 67 ostype & ?|?( ostype &, int ); 68 ostype & ?|?( ostype &, unsigned int ); 69 ostype & ?|?( ostype &, long int ); 70 ostype & ?|?( ostype &, long long int ); 71 ostype & ?|?( ostype &, unsigned long int ); 72 ostype & ?|?( ostype &, unsigned long long int ); 72 73 73 forall( dtype ostype | ostream( ostype ) )ostype & ?|?( ostype &, float ); // FIX ME: should not be required74 forall( dtype ostype | ostream( ostype ) )ostype & ?|?( ostype &, double );75 forall( dtype ostype | ostream( ostype ) )ostype & ?|?( ostype &, long double );74 ostype & ?|?( ostype &, float ); // FIX ME: should not be required 75 ostype & ?|?( ostype &, double ); 76 ostype & ?|?( ostype &, long double ); 76 77 77 forall( dtype ostype | ostream( ostype ) )ostype & ?|?( ostype &, float _Complex );78 forall( dtype ostype | ostream( ostype ) )ostype & ?|?( ostype &, double _Complex );79 forall( dtype ostype | ostream( ostype ) )ostype & ?|?( ostype &, long double _Complex );78 ostype & ?|?( ostype &, float _Complex ); 79 ostype & ?|?( ostype &, double _Complex ); 80 ostype & ?|?( ostype &, long double _Complex ); 80 81 81 forall( dtype ostype | ostream( ostype ) )ostype & ?|?( ostype &, const char * );82 //forall( dtype ostype | ostream( ostype ) )ostype & ?|?( ostype &, const char16_t * );82 ostype & ?|?( ostype &, const char * ); 83 // ostype & ?|?( ostype &, const char16_t * ); 83 84 #if ! ( __ARM_ARCH_ISA_ARM == 1 && __ARM_32BIT_STATE == 1 ) // char32_t == wchar_t => ambiguous 84 //forall( dtype ostype | ostream( ostype ) )ostype & ?|?( ostype &, const char32_t * );85 // ostype & ?|?( ostype &, const char32_t * ); 85 86 #endif // ! ( __ARM_ARCH_ISA_ARM == 1 && __ARM_32BIT_STATE == 1 ) 86 //forall( dtype ostype | ostream( ostype ) ) ostype & ?|?( ostype &, const wchar_t * ); 87 forall( dtype ostype | ostream( ostype ) ) ostype & ?|?( ostype &, const void * ); 87 // ostype & ?|?( ostype &, const wchar_t * ); 88 ostype & ?|?( ostype &, const void * ); 89 90 // manipulators 91 ostype & ?|?( ostype &, ostype & (*)( ostype & ) ); 92 ostype & endl( ostype & ); 93 ostype & sep( ostype & ); 94 ostype & sepTuple( ostype & ); 95 ostype & sepOn( ostype & ); 96 ostype & sepOff( ostype & ); 97 ostype & sepDisable( ostype & ); 98 ostype & sepEnable( ostype & ); 99 } // distribution 88 100 89 101 // tuples 90 102 forall( dtype ostype, otype T, ttype Params | writeable( T, ostype ) | { ostype & ?|?( ostype &, Params ); } ) 91 103 ostype & ?|?( ostype & os, T arg, Params rest ); 92 93 // manipulators94 forall( dtype ostype | ostream( ostype ) ) ostype & ?|?( ostype &, ostype & (*)( ostype & ) );95 forall( dtype ostype | ostream( ostype ) ) ostype & endl( ostype & );96 forall( dtype ostype | ostream( ostype ) ) ostype & sep( ostype & );97 forall( dtype ostype | ostream( ostype ) ) ostype & sepTuple( ostype & );98 forall( dtype ostype | ostream( ostype ) ) ostype & sepOn( ostype & );99 forall( dtype ostype | ostream( ostype ) ) ostype & sepOff( ostype & );100 forall( dtype ostype | ostream( ostype ) ) ostype & sepDisable( ostype & );101 forall( dtype ostype | ostream( ostype ) ) ostype & sepEnable( ostype & );102 104 103 105 // writes the range [begin, end) to the given stream … … 124 126 }; // readable 125 127 126 forall( dtype istype | istream( istype ) ) istype & ?|?( istype &, _Bool & ); 128 forall( dtype istype | istream( istype ) ) { 129 istype & ?|?( istype &, _Bool & ); 127 130 128 forall( dtype istype | istream( istype ) )istype & ?|?( istype &, char & );129 forall( dtype istype | istream( istype ) )istype & ?|?( istype &, signed char & );130 forall( dtype istype | istream( istype ) )istype & ?|?( istype &, unsigned char & );131 istype & ?|?( istype &, char & ); 132 istype & ?|?( istype &, signed char & ); 133 istype & ?|?( istype &, unsigned char & ); 131 134 132 forall( dtype istype | istream( istype ) )istype & ?|?( istype &, short int & );133 forall( dtype istype | istream( istype ) )istype & ?|?( istype &, unsigned short int & );134 forall( dtype istype | istream( istype ) )istype & ?|?( istype &, int & );135 forall( dtype istype | istream( istype ) )istype & ?|?( istype &, unsigned int & );136 forall( dtype istype | istream( istype ) )istype & ?|?( istype &, long int & );137 forall( dtype istype | istream( istype ) )istype & ?|?( istype &, long long int & );138 forall( dtype istype | istream( istype ) )istype & ?|?( istype &, unsigned long int & );139 forall( dtype istype | istream( istype ) )istype & ?|?( istype &, unsigned long long int & );135 istype & ?|?( istype &, short int & ); 136 istype & ?|?( istype &, unsigned short int & ); 137 istype & ?|?( istype &, int & ); 138 istype & ?|?( istype &, unsigned int & ); 139 istype & ?|?( istype &, long int & ); 140 istype & ?|?( istype &, long long int & ); 141 istype & ?|?( istype &, unsigned long int & ); 142 istype & ?|?( istype &, unsigned long long int & ); 140 143 141 forall( dtype istype | istream( istype ) )istype & ?|?( istype &, float & );142 forall( dtype istype | istream( istype ) )istype & ?|?( istype &, double & );143 forall( dtype istype | istream( istype ) )istype & ?|?( istype &, long double & );144 istype & ?|?( istype &, float & ); 145 istype & ?|?( istype &, double & ); 146 istype & ?|?( istype &, long double & ); 144 147 145 forall( dtype istype | istream( istype ) )istype & ?|?( istype &, float _Complex & );146 forall( dtype istype | istream( istype ) )istype & ?|?( istype &, double _Complex & );147 forall( dtype istype | istream( istype ) )istype & ?|?( istype &, long double _Complex & );148 istype & ?|?( istype &, float _Complex & ); 149 istype & ?|?( istype &, double _Complex & ); 150 istype & ?|?( istype &, long double _Complex & ); 148 151 149 // manipulators 150 forall( dtype istype | istream( istype ) ) istype & ?|?( istype &, istype & (*)( istype & ) ); 151 forall( dtype istype | istream( istype ) ) istype & endl( istype & is ); 152 // manipulators 153 istype & ?|?( istype &, istype & (*)( istype & ) ); 154 istype & endl( istype & is ); 155 } // distribution 152 156 153 157 struct _Istream_cstrUC { char * s; };
Note: See TracChangeset
for help on using the changeset viewer.