Ignore:
Timestamp:
Dec 12, 2018, 3:52:19 PM (5 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
Children:
1b8f13f0
Parents:
cdc02f2 (diff), 85acec94 (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:

Merge branch 'master' into shared_library

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/rational.cfa

    rcdc02f2 r515a037  
    1010// Created On       : Wed Apr  6 17:54:28 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Jun  2 09:24:33 2018
    13 // Update Count     : 162
     12// Last Modified On : Tue Dec 11 22:02:29 2018
     13// Update Count     : 168
    1414//
    1515
     
    3535        static RationalImpl simplify( RationalImpl & n, RationalImpl & d ) {
    3636                if ( d == (RationalImpl){0} ) {
    37                         serr | "Invalid rational number construction: denominator cannot be equal to 0." | endl;
     37                        serr | "Invalid rational number construction: denominator cannot be equal to 0.";
    3838                        exit( EXIT_FAILURE );
    3939                } // exit
     
    175175        } // ?|?
    176176
    177         forall( dtype ostype | ostream( ostype ) | { ostype & ?|?( ostype &, RationalImpl ); } )
    178         ostype & ?|?( ostype & os, Rational(RationalImpl ) r ) {
    179                 return os | r.numerator | '/' | r.denominator;
    180         } // ?|?
     177        forall( dtype ostype | ostream( ostype ) | { ostype & ?|?( ostype &, RationalImpl ); } ) {
     178                ostype & ?|?( ostype & os, Rational(RationalImpl) r ) {
     179                        return os | r.numerator | '/' | r.denominator;
     180                } // ?|?
     181
     182                void ?|?( ostype & os, Rational(RationalImpl) r ) {
     183                        (ostype)(os | r); if ( getANL( os ) ) nl( os );
     184                } // ?|?
     185        } // distribution
    181186} // distribution
    182187
Note: See TracChangeset for help on using the changeset viewer.