Changeset c635047


Ignore:
Timestamp:
Jul 18, 2023, 4:41:12 PM (9 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
49caf644
Parents:
5454d77
git-author:
Peter A. Buhr <pabuhr@…> (07/18/23 16:38:58)
git-committer:
Peter A. Buhr <pabuhr@…> (07/18/23 16:41:12)
Message:

more convertion to new void-creation stream macros

Location:
libcfa/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/gmp.hfa

    r5454d77 rc635047  
    1010// Created On       : Tue Apr 19 08:43:43 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Jun 29 09:43:30 2023
    13 // Update Count     : 33
     12// Last Modified On : Tue Jul 18 11:04:54 2023
     13// Update Count     : 35
    1414//
    1515
     
    268268                        return os;
    269269                } // ?|?
    270 
    271                 void ?|?( ostype & os, Int mp ) {
    272                         (ostype)(os | mp); ends( os );
    273                 } // ?|?
     270                OSTYPE_VOID_IMPL( Int )
    274271        } // distribution
    275272} // distribution
  • libcfa/src/iostream.cfa

    r5454d77 rc635047  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Jul 18 10:42:51 2023
    13 // Update Count     : 1401
     12// Last Modified On : Tue Jul 18 13:56:01 2023
     13// Update Count     : 1403
    1414//
    1515
     
    760760
    761761
    762 #define ISTYPE_VOID_VAL_IMPL( T ) \
    763         void ?|?( istype & is, T t ) { \
    764                 (istype &)(is | t); ends( is ); \
    765         } // ?|?
    766 
    767762forall( istype & | basic_istream( istype ) ) {
    768763        istype & ?|?( istype & is, bool & b ) {
     
    777772                return is;
    778773        } // ?|?
    779         ISTYPE_VOID_IMPL( bool )
     774        ISTYPE_VOID_IMPL( bool & )
    780775
    781776        istype & ?|?( istype & is, char & c ) {
     
    789784                return is;
    790785        } // ?|?
    791         ISTYPE_VOID_IMPL( char )
     786        ISTYPE_VOID_IMPL( char & )
    792787
    793788        istype & ?|?( istype & is, signed char & sc ) {
     
    795790                return is;
    796791        } // ?|?
    797         ISTYPE_VOID_IMPL( signed char )
     792        ISTYPE_VOID_IMPL( signed char & )
    798793
    799794        istype & ?|?( istype & is, unsigned char & usc ) {
     
    801796                return is;
    802797        } // ?|?
    803         ISTYPE_VOID_IMPL( unsigned char )
     798        ISTYPE_VOID_IMPL( unsigned char & )
    804799
    805800        istype & ?|?( istype & is, short int & si ) {
     
    807802                return is;
    808803        } // ?|?
    809         ISTYPE_VOID_IMPL( short int )
     804        ISTYPE_VOID_IMPL( short int & )
    810805
    811806        istype & ?|?( istype & is, unsigned short int & usi ) {
     
    813808                return is;
    814809        } // ?|?
    815         ISTYPE_VOID_IMPL( unsigned short int )
     810        ISTYPE_VOID_IMPL( unsigned short int & )
    816811
    817812        istype & ?|?( istype & is, int & i ) {
     
    819814                return is;
    820815        } // ?|?
    821         ISTYPE_VOID_IMPL( int )
     816        ISTYPE_VOID_IMPL( int & )
    822817
    823818        istype & ?|?( istype & is, unsigned int & ui ) {
     
    825820                return is;
    826821        } // ?|?
    827         ISTYPE_VOID_IMPL( unsigned int )
     822        ISTYPE_VOID_IMPL( unsigned int & )
    828823
    829824        istype & ?|?( istype & is, long int & li ) {
     
    831826                return is;
    832827        } // ?|?
    833         ISTYPE_VOID_IMPL( long int )
     828        ISTYPE_VOID_IMPL( long int & )
    834829
    835830        istype & ?|?( istype & is, unsigned long int & ulli ) {
     
    837832                return is;
    838833        } // ?|?
    839         ISTYPE_VOID_IMPL( unsigned long int )
     834        ISTYPE_VOID_IMPL( unsigned long int & )
    840835
    841836        istype & ?|?( istype & is, long long int & lli ) {
     
    843838                return is;
    844839        } // ?|?
    845         ISTYPE_VOID_IMPL( long long int )
     840        ISTYPE_VOID_IMPL( long long int & )
    846841
    847842        istype & ?|?( istype & is, unsigned long long int & ulli ) {
     
    849844                return is;
    850845        } // ?|?
    851         ISTYPE_VOID_IMPL( unsigned long long int )
     846        ISTYPE_VOID_IMPL( unsigned long long int & )
    852847
    853848        #if defined( __SIZEOF_INT128__ )
     
    855850                return (istype &)(is | (unsigned int128 &)llli);
    856851        } // ?|?
    857         ISTYPE_VOID_IMPL( int128 )
     852        ISTYPE_VOID_IMPL( int128 & )
    858853
    859854        istype & ?|?( istype & is, unsigned int128 & ullli ) {
     
    872867                return is;
    873868        } // ?|?
    874         ISTYPE_VOID_IMPL( unsigned int128 )
     869        ISTYPE_VOID_IMPL( unsigned int128 & )
    875870        #endif // __SIZEOF_INT128__
    876871
     
    879874                return is;
    880875        } // ?|?
    881         ISTYPE_VOID_IMPL( float )
     876        ISTYPE_VOID_IMPL( float & )
    882877
    883878        istype & ?|?( istype & is, double & d ) {
     
    885880                return is;
    886881        } // ?|?
    887         ISTYPE_VOID_IMPL( double )
     882        ISTYPE_VOID_IMPL( double & )
    888883
    889884        istype & ?|?( istype & is, long double & ld ) {
     
    891886                return is;
    892887        } // ?|?
    893         ISTYPE_VOID_IMPL( long double )
     888        ISTYPE_VOID_IMPL( long double & )
    894889
    895890        istype & ?|?( istype & is, float _Complex & fc ) {
     
    899894                return is;
    900895        } // ?|?
    901         ISTYPE_VOID_IMPL( float _Complex )
     896        ISTYPE_VOID_IMPL( float _Complex & )
    902897
    903898        istype & ?|?( istype & is, double _Complex & dc ) {
     
    907902                return is;
    908903        } // ?|?
    909         ISTYPE_VOID_IMPL( double _Complex )
     904        ISTYPE_VOID_IMPL( double _Complex & )
    910905
    911906        istype & ?|?( istype & is, long double _Complex & ldc ) {
     
    915910                return is;
    916911        } // ?|?
    917         ISTYPE_VOID_IMPL( long double _Complex )
     912        ISTYPE_VOID_IMPL( long double _Complex & )
    918913
    919914        // istype & ?|?( istype & is, const char fmt[] ) {
     
    926921                return is;
    927922        } // ?|?
    928         ISTYPE_VOID_VAL_IMPL( char * )
     923        ISTYPE_VOID_IMPL( char * )
    929924
    930925        // manipulators
     
    988983                return is;
    989984        } // ?|?
    990         ISTYPE_VOID_VAL_IMPL( _Istream_Cstr )
     985        ISTYPE_VOID_IMPL( _Istream_Cstr )
    991986
    992987        istype & ?|?( istype & is, _Istream_Char f ) {
     
    994989                return is;
    995990        } // ?|?
    996         ISTYPE_VOID_VAL_IMPL( _Istream_Char )
     991        ISTYPE_VOID_IMPL( _Istream_Char )
    997992} // distribution
    998993
     
    10111006                return is; \
    10121007        } /* ?|? */ \
    1013         ISTYPE_VOID_VAL_IMPL( _Istream_Manip(T) ) \
     1008        ISTYPE_VOID_IMPL( _Istream_Manip(T) ) \
    10141009} // distribution
    10151010
     
    10391034                return is;
    10401035        } // ?|?
    1041         ISTYPE_VOID_VAL_IMPL( _Istream_Manip(float _Complex) )
     1036        ISTYPE_VOID_IMPL( _Istream_Manip(float _Complex) )
    10421037
    10431038        istype & ?|?( istype & is, _Istream_Manip(double _Complex) dc ) {
     
    10501045                return is;
    10511046        } // ?|?
    1052         ISTYPE_VOID_VAL_IMPL( _Istream_Manip(double _Complex) )
     1047        ISTYPE_VOID_IMPL( _Istream_Manip(double _Complex) )
    10531048
    10541049        istype & ?|?( istype & is, _Istream_Manip(long double _Complex) ldc ) {
     
    10611056                return is;
    10621057        } // ?|?
    1063         ISTYPE_VOID_VAL_IMPL( _Istream_Manip(long double _Complex) )
     1058        ISTYPE_VOID_IMPL( _Istream_Manip(long double _Complex) )
    10641059} // distribution
    10651060
  • libcfa/src/iostream.hfa

    r5454d77 rc635047  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Jul 18 10:42:52 2023
    13 // Update Count     : 438
     12// Last Modified On : Tue Jul 18 15:57:21 2023
     13// Update Count     : 462
    1414//
    1515
     
    138138        OSTYPE_VOID( const void * );
    139139
     140        // forall( T | { ostype & ?|?( ostype &, T ); } )
     141        // void ?|?( ostype & os, T );
     142
    140143        // manipulators
    141144        ostype & ?|?( ostype &, ostype & (*)( ostype & ) );
     
    214217forall( ostype & | basic_ostream( ostype ) ) { \
    215218        ostype & ?|?( ostype & os, _Ostream_Manip(T) f ); \
    216         void ?|?( ostype & os, _Ostream_Manip(T) f ); \
     219        OSTYPE_VOID( _Ostream_Manip(T) ); \
    217220} // ?|?
    218221
     
    259262forall( ostype & | basic_ostream( ostype ) ) { \
    260263        ostype & ?|?( ostype & os, _Ostream_Manip(T) f ); \
    261         void ?|?( ostype & os, _Ostream_Manip(T) f ); \
     264        OSTYPE_VOID( _Ostream_Manip(T) ); \
    262265} // ?|?
    263266
     
    279282forall( ostype & | basic_ostream( ostype ) ) {
    280283        ostype & ?|?( ostype & os, _Ostream_Manip(char) f );
    281         void ?|?( ostype & os, _Ostream_Manip(char) f );
     284        OSTYPE_VOID( _Ostream_Manip(char) ); \
    282285} // ?|?
    283286
     
    297300forall( ostype & | basic_ostream( ostype ) ) {
    298301        ostype & ?|?( ostype & os, _Ostream_Manip(const char *) f );
    299         void ?|?( ostype & os, _Ostream_Manip(const char *) f );
     302        OSTYPE_VOID( _Ostream_Manip(const char *) ); \
    300303} // ?|?
    301304
     
    306309#define ISTYPE_VOID( T ) void ?|?( istype &, T )
    307310#define ISTYPE_VOID_IMPL( T ) \
    308         void ?|?( istype & is, T & t ) { \
     311        void ?|?( istype & is, T t ) { \
    309312                (istype &)(is | t); ends( is ); \
    310313        } // ?|?
     
    387390//      istype & ?|?( istype &, const char [] );
    388391        istype & ?|?( istype &, char [] );
    389         void ?|?( istype &, char [] );
     392        ISTYPE_VOID( char * );
    390393
    391394        // manipulators
     
    426429forall( istype & | basic_istream( istype ) ) {
    427430        istype & ?|?( istype & is, _Istream_Cstr f );
    428         void ?|?( istype & is, _Istream_Cstr f );
     431        ISTYPE_VOID( _Istream_Cstr );
    429432}
    430433
     
    439442forall( istype & | basic_istream( istype ) ) {
    440443        istype & ?|?( istype & is, _Istream_Char f );
    441         void ?|?( istype & is, _Istream_Char f );
     444        ISTYPE_VOID( _Istream_Char );
    442445}
    443446
     
    458461forall( istype & | basic_istream( istype ) ) { \
    459462        istype & ?|?( istype & is, _Istream_Manip(T) f ); \
    460         void ?|?( istype & is, _Istream_Manip(T) f ); \
     463        ISTYPE_VOID( _Istream_Manip(T) ); \
    461464} // ?|?
    462465
     
    488491forall( ostype & | ostream( ostype ) ) {
    489492        ostype & ?|?( ostype & os, Duration dur );
    490         void ?|?( ostype & os, Duration dur );
     493        OSTYPE_VOID( Duration );
    491494        ostype & ?|?( ostype & os, Time time );
    492         void ?|?( ostype & os, Time time );
     495        OSTYPE_VOID( Time );
    493496} // distribution
    494497
Note: See TracChangeset for help on using the changeset viewer.