Changeset 1e6e08de


Ignore:
Timestamp:
Dec 24, 2017, 8:04:57 AM (4 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
e672372
Parents:
b9be000b
Message:

print "true" and "false" for _Bool

Location:
src/libcfa
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/iostream

    rb9be000b r1e6e08de  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Dec  6 23:03:30 2017
    13 // Update Count     : 144
     12// Last Modified On : Thu Dec 21 13:55:41 2017
     13// Update Count     : 145
    1414//
    1515
     
    5555
    5656// implement writable for intrinsic types
     57
     58forall( dtype ostype | ostream( ostype ) ) ostype & ?|?( ostype &, _Bool );
    5759
    5860forall( dtype ostype | ostream( ostype ) ) ostype & ?|?( ostype &, char );
  • src/libcfa/iostream.c

    rb9be000b r1e6e08de  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Dec  6 23:03:43 2017
    13 // Update Count     : 426
     12// Last Modified On : Thu Dec 21 13:55:09 2017
     13// Update Count     : 427
    1414//
    1515
     
    2323#include <complex.h>                                                                    // creal, cimag
    2424}
     25
     26forall( dtype ostype | ostream( ostype ) )
     27ostype & ?|?( ostype & os, _Bool b ) {
     28        if ( sepPrt( os ) ) fmt( os, "%s", sepGetCur( os ) );
     29        fmt( os, "%s", b ? "true" : "false" );
     30        return os;
     31} // ?|?
    2532
    2633forall( dtype ostype | ostream( ostype ) )
Note: See TracChangeset for help on using the changeset viewer.