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.hfa

    r467c8b7 rc08c3cf  
    2222
    2323
    24 trait ostream( dtype ostype ) {
     24trait ostream( ostype & ) {
    2525        // private
    2626        bool $sepPrt( ostype & );                                                       // get separator state (on/off)
     
    5757}; // ostream
    5858
    59 // trait writeable( otype T ) {
    60 //      forall( dtype ostype | ostream( ostype ) ) ostype & ?|?( ostype &, T );
     59// trait writeable( T ) {
     60//      forall( ostype & | ostream( ostype ) ) ostype & ?|?( ostype &, T );
    6161// }; // writeable
    6262
    63 trait writeable( otype T, dtype ostype | ostream( ostype ) ) {
     63trait writeable( T, ostype & | ostream( ostype ) ) {
    6464        ostype & ?|?( ostype &, T );
    6565}; // writeable
     
    6767// implement writable for intrinsic types
    6868
    69 forall( dtype ostype | ostream( ostype ) ) {
     69forall( ostype & | ostream( ostype ) ) {
    7070        ostype & ?|?( ostype &, bool );
    7171        void ?|?( ostype &, bool );
     
    142142
    143143// tuples
    144 forall( dtype ostype, otype T, ttype Params | writeable( T, ostype ) | { ostype & ?|?( ostype &, Params ); } ) {
     144forall( ostype &, T, Params... | writeable( T, ostype ) | { ostype & ?|?( ostype &, Params ); } ) {
    145145        ostype & ?|?( ostype & os, T arg, Params rest );
    146146        void ?|?( ostype & os, T arg, Params rest );
     
    148148
    149149// writes the range [begin, end) to the given stream
    150 forall( dtype ostype, otype elt_type | writeable( elt_type, ostype ), otype iterator_type | iterator( iterator_type, elt_type ) ) {
     150forall( ostype &, elt_type | writeable( elt_type, ostype ), iterator_type | iterator( iterator_type, elt_type ) ) {
    151151        void write( iterator_type begin, iterator_type end, ostype & os );
    152152        void write_reverse( iterator_type begin, iterator_type end, ostype & os );
     
    155155// *********************************** manipulators ***********************************
    156156
    157 forall( otype T )
     157forall( T )
    158158struct _Ostream_Manip {
    159159        T val;                                                                                          // polymorphic base-type
     
    195195        _Ostream_Manip(T) & sign( _Ostream_Manip(T) & fmt ) { fmt.flags.sign = true; return fmt; } \
    196196} /* distribution */ \
    197 forall( dtype ostype | ostream( ostype ) ) { \
     197forall( ostype & | ostream( ostype ) ) { \
    198198        ostype & ?|?( ostype & os, _Ostream_Manip(T) f ); \
    199199        void ?|?( ostype & os, _Ostream_Manip(T) f ); \
     
    236236        _Ostream_Manip(T) & nodp( _Ostream_Manip(T) & fmt ) { fmt.flags.nobsdp = true; return fmt; } \
    237237} /* distribution */ \
    238 forall( dtype ostype | ostream( ostype ) ) { \
     238forall( ostype & | ostream( ostype ) ) { \
    239239        ostype & ?|?( ostype & os, _Ostream_Manip(T) f ); \
    240240        void ?|?( ostype & os, _Ostream_Manip(T) f ); \
     
    256256        _Ostream_Manip(char) & nobase( _Ostream_Manip(char) & fmt ) { fmt.flags.nobsdp = true; return fmt; }
    257257} // distribution
    258 forall( dtype ostype | ostream( ostype ) ) {
     258forall( ostype & | ostream( ostype ) ) {
    259259        ostype & ?|?( ostype & os, _Ostream_Manip(char) f );
    260260        void ?|?( ostype & os, _Ostream_Manip(char) f );
     
    274274        _Ostream_Manip(const char *) & nobase( _Ostream_Manip(const char *) & fmt ) { fmt.flags.nobsdp = true; return fmt; }
    275275} // distribution
    276 forall( dtype ostype | ostream( ostype ) ) {
     276forall( ostype & | ostream( ostype ) ) {
    277277        ostype & ?|?( ostype & os, _Ostream_Manip(const char *) f );
    278278        void ?|?( ostype & os, _Ostream_Manip(const char *) f );
     
    283283
    284284
    285 trait istream( dtype istype ) {
     285trait istream( istype & ) {
    286286        void nlOn( istype & );                                                          // read newline
    287287        void nlOff( istype & );                                                         // scan newline
     
    296296}; // istream
    297297
    298 trait readable( otype T ) {
    299         forall( dtype istype | istream( istype ) ) istype & ?|?( istype &, T );
     298trait readable( T ) {
     299        forall( istype & | istream( istype ) ) istype & ?|?( istype &, T );
    300300}; // readable
    301301
    302 forall( dtype istype | istream( istype ) ) {
     302forall( istype & | istream( istype ) ) {
    303303        istype & ?|?( istype &, bool & );
    304304
     
    365365        _Istream_Cstr & wdi( unsigned int w, _Istream_Cstr & fmt ) { fmt.wd = w; return fmt; }
    366366} // distribution
    367 forall( dtype istype | istream( istype ) ) istype & ?|?( istype & is, _Istream_Cstr f );
     367forall( istype & | istream( istype ) ) istype & ?|?( istype & is, _Istream_Cstr f );
    368368
    369369struct _Istream_Char {
     
    375375        _Istream_Char & ignore( _Istream_Char & fmt ) { fmt.ignore = true; return fmt; }
    376376} // distribution
    377 forall( dtype istype | istream( istype ) ) istype & ?|?( istype & is, _Istream_Char f );
    378 
    379 forall( dtype T | sized( T ) )
     377forall( istype & | istream( istype ) ) istype & ?|?( istype & is, _Istream_Char f );
     378
     379forall( T & | sized( T ) )
    380380struct _Istream_Manip {
    381381        T & val;                                                                                        // polymorphic base-type
     
    391391        _Istream_Manip(T) & wdi( unsigned int w, _Istream_Manip(T) & fmt ) { fmt.wd = w; return fmt; } \
    392392} /* distribution */ \
    393 forall( dtype istype | istream( istype ) ) { \
     393forall( istype & | istream( istype ) ) { \
    394394        istype & ?|?( istype & is, _Istream_Manip(T) f ); \
    395395} // ?|?
     
    420420#include <time_t.hfa>                                                                   // Duration (constructors) / Time (constructors)
    421421
    422 forall( dtype ostype | ostream( ostype ) ) {
     422forall( ostype & | ostream( ostype ) ) {
    423423        ostype & ?|?( ostype & os, Duration dur );
    424424        void ?|?( ostype & os, Duration dur );
Note: See TracChangeset for help on using the changeset viewer.