Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!sri-unix!rutgers!clyde!watmath!water!pabuhr From: pabuhr@water.waterloo.edu (pabuhr) Newsgroups: comp.lang.c++ Subject: BUG II? Message-ID: <1149@water.waterloo.edu> Date: Mon, 5-Oct-87 15:44:26 EDT Article-I.D.: water.1149 Posted: Mon Oct 5 15:44:26 1987 Date-Received: Fri, 9-Oct-87 01:55:14 EDT Reply-To: pabuhr@water.UUCP () Distribution: world Organization: U. of Waterloo, Ontario Lines: 55 Can anyone explain why I get the compilation error. Is it my fail? #include class s { public: inline operator int(); // conversion to int(char) friend istream& operator>>(istream &, s &); // output }; // s enum eee { A, B, C }; eee f( s ); main() { s inputline; eee ft; cin >> inputline; ft = f( inputline ); } ========= cd /u/pabuhr/sm/string/ ccc -c bug.cc ccc bug.cc: "bug.cc", line 18: error: ambiguous operand types eee (s ) and s for function call 1 error Compilation exited abnormally with code 1 at Mon Oct 5 15:34:33 =========== #line 1 "bug.cc" /* <> */ /* < bug.cc */ char *_new(); char _delete(); char *_vec_new(); char _vec_delete(); #line 1 "/usr/lib/ccc/incl/stream.h" ..... <=== deleted the stream.h stuff #line 3 "bug.cc" struct s { /* sizeof s == 1 */ char _dummy; }; #line 6 "bug.cc" extern struct istream *_rshiftFRCistream__RCs___ (); #line 9 "bug.cc" /* enum eee */ #line 11 "bug.cc" int f (); /* the end */