Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/iostream.hfa

    rf842032 re0dc038  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Oct 18 21:21:20 2023
    13 // Update Count     : 583
     12// Last Modified On : Mon Oct 16 21:12:01 2023
     13// Update Count     : 573
    1414//
    1515
     
    306306// *********************************** istream ***********************************
    307307
     308#define ISTYPE_VOID( T ) void ?|?( istype &, T )
     309#define ISTYPE_VOID_IMPL( T ) \
     310        void ?|?( istype & is, T t ) { \
     311                (istype &)(is | t); ends( is ); \
     312        } // ?|?
     313
    308314forall( istype & )
    309315trait basic_istream {
     
    314320        void nlOn( istype & );                                                          // read newline
    315321        void nlOff( istype & );                                                         // scan newline
     322        void ends( istype & os );                                                       // end of output statement
    316323        int fmt( istype &, const char format[], ... ) __attribute__(( format(scanf, 2, 3) ));
    317324        istype & ungetc( istype &, char );
     
    336343forall( istype & | basic_istream( istype ) ) {
    337344        istype & ?|?( istype &, bool & );
     345        ISTYPE_VOID( bool & );
    338346
    339347        istype & ?|?( istype &, char & );
     348        ISTYPE_VOID( char & );
    340349        istype & ?|?( istype &, signed char & );
     350        ISTYPE_VOID( signed char & );
    341351        istype & ?|?( istype &, unsigned char & );
     352        ISTYPE_VOID( unsigned char & );
    342353
    343354        istype & ?|?( istype &, short int & );
     355        ISTYPE_VOID( short int & );
    344356        istype & ?|?( istype &, unsigned short int & );
     357        ISTYPE_VOID( unsigned short int & );
    345358        istype & ?|?( istype &, int & );
     359        ISTYPE_VOID( int & );
    346360        istype & ?|?( istype &, unsigned int & );
     361        ISTYPE_VOID( unsigned int & );
    347362        istype & ?|?( istype &, long int & );
     363        ISTYPE_VOID( long int & );
    348364        istype & ?|?( istype &, unsigned long int & );
     365        ISTYPE_VOID( unsigned long int & );
    349366        istype & ?|?( istype &, long long int & );
     367        ISTYPE_VOID( long long int & );
    350368        istype & ?|?( istype &, unsigned long long int & );
     369        ISTYPE_VOID( unsigned long long int & );
    351370        #if defined( __SIZEOF_INT128__ )
    352371        istype & ?|?( istype &, int128 & );
     372        ISTYPE_VOID( int128 & );
    353373        istype & ?|?( istype &, unsigned int128 & );
     374        ISTYPE_VOID( unsigned int128 & );
    354375        #endif // __SIZEOF_INT128__
    355376
    356377        istype & ?|?( istype &, float & );
     378        ISTYPE_VOID( float & );
    357379        istype & ?|?( istype &, double & );
     380        ISTYPE_VOID( double & );
    358381        istype & ?|?( istype &, long double & );
     382        ISTYPE_VOID( long double & );
    359383
    360384        istype & ?|?( istype &, float _Complex & );
     385        ISTYPE_VOID( float _Complex & );
    361386        istype & ?|?( istype &, double _Complex & );
     387        ISTYPE_VOID( double _Complex & );
    362388        istype & ?|?( istype &, long double _Complex & );
     389        ISTYPE_VOID( long double _Complex & );
    363390
    364391        istype & ?|?( istype &, const char [] );
     392        ISTYPE_VOID( const char [] );
    365393
    366394        // manipulators
    367395        istype & ?|?( istype &, istype & (*)( istype & ) );
     396        ISTYPE_VOID( istype & (*)( istype & ) );
    368397        istype & nl( istype & is );
    369398        istype & nlOn( istype & );
     
    390419forall( istype & | basic_istream( istype ) ) {
    391420        istype & ?|?( istype & is, _Istream_Cskip f );
     421        ISTYPE_VOID( _Istream_Cskip );
    392422}
    393423
     
    431461forall( istype & | basic_istream( istype ) ) {
    432462        istype & ?|?( istype & is, _Istream_Cstr f );
     463        ISTYPE_VOID( _Istream_Cstr );
    433464}
    434465
     
    443474forall( istype & | basic_istream( istype ) ) {
    444475        istype & ?|?( istype & is, _Istream_Char f );
     476        ISTYPE_VOID( _Istream_Char );
    445477}
    446478
     
    461493forall( istype & | basic_istream( istype ) ) { \
    462494        istype & ?|?( istype & is, _Istream_Manip(T) f ); \
     495        ISTYPE_VOID( _Istream_Manip(T) ); \
    463496} // ?|?
    464497
Note: See TracChangeset for help on using the changeset viewer.