Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!lll-winken!uunet!microsoft!jimad From: jimad@microsoft.UUCP (Jim ADCOCK) Newsgroups: comp.std.c++ Subject: Re: request for comments Message-ID: <70305@microsoft.UUCP> Date: 29 Jan 91 22:08:14 GMT References: <21@microsoft.UUCP> <95@tdatirv.UUCP> Reply-To: jimad@microsoft.UUCP (Jim ADCOCK) Organization: Microsoft Corp., Redmond WA Lines: 19 In article <95@tdatirv.UUCP> sarima@tdatirv.UUCP (Stanley Friesen) writes: |In article <21@microsoft.UUCP> jimad@microsoft.UUCP (Jim ADCOCK) writes: || ||"An operator function must either be a member function or take at least one ||argument of class type or of a type derived from a class type." | |I'm not sure I see the difference. A type derived from a class type is also |a class type! The only real difference I see is that your proposed new version |forgets to allow references, and is thus *more* restrictive. Again, please don't confuse class derivation with type derivation. Class derivation is only one way to make derived types. See page 24 ARM for a number of other ways to make derived types. Also, it has been pointed out to me that now that enums are distinct types, perhaps they too should be candidates for operator overloading: "An operator function must either be a member function or take at least one argument of class type, enum type, or of a type derived from a class or enum type."