Ignore:
Timestamp:
Jan 20, 2021, 8:46:31 PM (12 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
arm-eh, jacob/cs343-translation, master, new-ast-unique-expr
Children:
481cf3a
Parents:
467c8b7 (diff), 9db2c92 (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.
Message:

fix conflict

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/iostream.cfa

    r467c8b7 rc08c3cf  
    3636
    3737
    38 forall( dtype ostype | ostream( ostype ) ) {
     38forall( ostype & | ostream( ostype ) ) {
    3939        ostype & ?|?( ostype & os, bool b ) {
    4040                if ( $sepPrt( os ) ) fmt( os, "%s", $sepGetCur( os ) );
     
    407407
    408408// tuples
    409 forall( dtype ostype, otype T, ttype Params | writeable( T, ostype ) | { ostype & ?|?( ostype &, Params ); } ) {
     409forall( ostype &, T, Params... | writeable( T, ostype ) | { ostype & ?|?( ostype &, Params ); } ) {
    410410        ostype & ?|?( ostype & os, T arg, Params rest ) {
    411411                (ostype &)(os | arg);                                                   // print first argument
     
    426426
    427427// writes the range [begin, end) to the given stream
    428 forall( dtype ostype, otype elt_type | writeable( elt_type, ostype ), otype iterator_type | iterator( iterator_type, elt_type ) ) {
     428forall( ostype &, elt_type | writeable( elt_type, ostype ), iterator_type | iterator( iterator_type, elt_type ) ) {
    429429        void write( iterator_type begin, iterator_type end, ostype & os ) {
    430430                void print( elt_type i ) { os | i; }
     
    447447// Default prefix for non-decimal prints is 0b, 0, 0x.
    448448#define IntegralFMTImpl( T, IFMTNP, IFMTP ) \
    449 forall( dtype ostype | ostream( ostype ) ) { \
     449forall( ostype & | ostream( ostype ) ) { \
    450450        ostype & ?|?( ostype & os, _Ostream_Manip(T) f ) { \
    451451                if ( $sepPrt( os ) ) fmt( os, "%s", $sepGetCur( os ) ); \
     
    540540// Default prefix for non-decimal prints is 0b, 0, 0x.
    541541#define IntegralFMTImpl128( T, SIGNED, CODE, IFMTNP, IFMTP ) \
    542 forall( dtype ostype | ostream( ostype ) ) \
     542forall( ostype & | ostream( ostype ) ) \
    543543static void base10_128( ostype & os, _Ostream_Manip(T) f ) { \
    544544        if ( f.val > UINT64_MAX ) { \
     
    557557        } /* if */ \
    558558} /* base10_128 */ \
    559 forall( dtype ostype | ostream( ostype ) ) { \
     559forall( ostype & | ostream( ostype ) ) { \
    560560        ostype & ?|?( ostype & os, _Ostream_Manip(T) f ) { \
    561561                if ( $sepPrt( os ) ) fmt( os, "%s", $sepGetCur( os ) ); \
     
    659659#if defined( __SIZEOF_INT128__ )
    660660// Default prefix for non-decimal prints is 0b, 0, 0x.
    661 forall( dtype ostype | ostream( ostype ) )
     661forall( ostype & | ostream( ostype ) )
    662662static inline void base_128( ostype & os, unsigned int128 val, unsigned int128 power, _Ostream_Manip(uint64_t) & f, unsigned int maxdig, unsigned int bits, unsigned int cnt = 0 ) {
    663663        int wd = 1;                                                                                     // f.wd is never 0 because 0 implies left-pad
     
    724724
    725725#define IntegralFMTImpl128( T ) \
    726 forall( dtype ostype | ostream( ostype ) ) { \
     726forall( ostype & | ostream( ostype ) ) { \
    727727        ostype & ?|?( ostype & os, _Ostream_Manip(T) f ) { \
    728728                _Ostream_Manip(uint64_t) fmt; \
     
    772772
    773773#define FloatingPointFMTImpl( T, DFMTNP, DFMTP ) \
    774 forall( dtype ostype | ostream( ostype ) ) { \
     774forall( ostype & | ostream( ostype ) ) { \
    775775        ostype & ?|?( ostype & os, _Ostream_Manip(T) f ) { \
    776776                if ( $sepPrt( os ) ) fmt( os, "%s", $sepGetCur( os ) ); \
     
    806806// *********************************** character ***********************************
    807807
    808 forall( dtype ostype | ostream( ostype ) ) {
     808forall( ostype & | ostream( ostype ) ) {
    809809        ostype & ?|?( ostype & os, _Ostream_Manip(char) f ) {
    810810                if ( f.base != 'c' ) {                                                  // bespoke binary/octal/hex format
     
    839839// *********************************** C string ***********************************
    840840
    841 forall( dtype ostype | ostream( ostype ) ) {
     841forall( ostype & | ostream( ostype ) ) {
    842842        ostype & ?|?( ostype & os, _Ostream_Manip(const char *) f ) {
    843843                if ( ! f.val ) return os;                                               // null pointer ?
     
    887887
    888888
    889 forall( dtype istype | istream( istype ) ) {
     889forall( istype & | istream( istype ) ) {
    890890        istype & ?|?( istype & is, bool & b ) {
    891891                char val[6];
     
    10531053// *********************************** manipulators ***********************************
    10541054
    1055 forall( dtype istype | istream( istype ) )
     1055forall( istype & | istream( istype ) )
    10561056istype & ?|?( istype & is, _Istream_Cstr f ) {
    10571057        // skip xxx
     
    10881088} // ?|?
    10891089
    1090 forall( dtype istype | istream( istype ) )
     1090forall( istype & | istream( istype ) )
    10911091istype & ?|?( istype & is, _Istream_Char f ) {
    10921092        fmt( is, "%*c" );                                                                       // argument variable unused
     
    10951095
    10961096#define InputFMTImpl( T, CODE ) \
    1097 forall( dtype istype | istream( istype ) ) \
     1097forall( istype & | istream( istype ) ) \
    10981098istype & ?|?( istype & is, _Istream_Manip(T) f ) { \
    10991099        enum { size = 16 }; \
     
    11241124InputFMTImpl( long double, "Lf" )
    11251125
    1126 forall( dtype istype | istream( istype ) )
     1126forall( istype & | istream( istype ) )
    11271127istype & ?|?( istype & is, _Istream_Manip(float _Complex) fc ) {
    11281128        float re, im;
     
    11351135} // ?|?
    11361136
    1137 forall( dtype istype | istream( istype ) )
     1137forall( istype & | istream( istype ) )
    11381138istype & ?|?( istype & is, _Istream_Manip(double _Complex) dc ) {
    11391139        double re, im;
     
    11461146} // ?|?
    11471147
    1148 forall( dtype istype | istream( istype ) )
     1148forall( istype & | istream( istype ) )
    11491149istype & ?|?( istype & is, _Istream_Manip(long double _Complex) ldc ) {
    11501150        long double re, im;
Note: See TracChangeset for help on using the changeset viewer.