// ---------------------------------------------------------------------- // // wchruniq.cc - Is wchar_t treated as a distinct type? // // History: // 17-Sep-1999 WEB Initial draft, adapted from booluniq.cc // 26-Oct-1999 WEB Eliminate warning re truncated short // 25-Apr-2001 WEB s//"ISOcxx\/ISOcxxSyntax.hh"/ // // ---------------------------------------------------------------------- #include "ISOcxx/ISOcxxSyntax.hh" int f( wchar_t & b ) { b = L'x'; return 0; } #if ! defined DEFECT_WCHAR_T_NOT_DISTINCT_TYPE int f( char & c ) { c = 'x'; return 1; } int f( int & i ) { i = -9999; return 2; } int f( unsigned short & u ) { u = 9999; return 3; } #endif /* DEFECT_WCHAR_T_NOT_DISTINCT_TYPE */ int main() { wchar_t w( L'a' ); return f( w ); } // main()