Path: utzoo!attcan!uunet!comp.vuw.ac.nz!actrix!Bruce.Hoult From: Bruce.Hoult@bbs.actrix.gen.nz Newsgroups: comp.std.c++ Subject: Re: Should unary operators convert? Keywords: unary operator conversions Message-ID: <1991Jan29.052255.2923@actrix.gen.nz> Date: 29 Jan 91 05:22:55 GMT References: <10440@pasteur.Berkeley.EDU> Sender: Bruce.Hoult@actrix.gen.nz (Bruce Hoult) Organization: Actrix Information Exchange, Wellington, New Zealand Lines: 15 Comment-To: krste@ICSI.Berkeley.EDU Krste Asanovic writes: >Should the unary operators *, &, +, -, !, ~ perform user-defined >conversions on their argument? > >The following example is rejected by g++ (1.37.2b) and cfront >(2.00.02). Your example is accepted without complaint by Apple's MPW CFront 1.0 (an AT&T 2.0 compiler). The C code produced is also what you would expect. -- Bruce.Hoult@bbs.actrix.gen.nz Twisted pair: +64 4 772 116 BIX: brucehoult Last Resort: PO Box 4145 Wellington, NZ "And they shall beat their swords into plowshares, for if you hit a man with a plowshare, he's going to know he's been hit."