// ---------------------------------------------------------------------- // // booluniq.cc - Is bool treated as a distinct type? // // History: // 08-Jul-1999 WEB Initial draft, adapted from Blitz++ // 17-Sep-1999 WEB Add another signature for f(); avoid problem if // defective // 25-Apr-2001 WEB s//"ISOcxx\/ISOcxxSyntax.hh"/ // // ---------------------------------------------------------------------- #include "ISOcxx/ISOcxxSyntax.hh" int f( bool & b ) { b = false; return 0; } #if ! defined DEFECT_BOOL_NOT_DISTINCT_TYPE int f( char & c ) { c = 'x' ; return 1; } int f( int & i ) { i = -9999; return 2; } int f( unsigned int & u ) { u = 99999; return 3; } #endif /* DEFECT_BOOL_NOT_DISTINCT_TYPE */ int main() { bool b( true ); return f( b ); } // main()