Path: utzoo!attcan!uunet!spool2.mu.edu!think.com!snorkelwacker.mit.edu!bloom-beacon!eru!hagbard!sunic!lth.se!newsuser From: dag@control.lth.se (Dag Bruck) Newsgroups: comp.std.c++ Subject: Re: request for comments Message-ID: <1991Jan23.064708.27115@lth.se> Date: 23 Jan 91 06:47:08 GMT References: <21@microsoft.UUCP> <35@microsoft.UUCP> Sender: newsuser@lth.se (LTH network news server) Organization: Department of Automatic Control, Lund, Sweden Lines: 17 In article <35@microsoft.UUCP> jimad@microsoft.UUCP (Jim ADCOCK) 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 understand why you would not allow the user to redefine operators on built-in types, e.g., "int + int". Operator functions acting on enumerations -- in addition to classes -- would be useful, though. Do we really need the restriction Jim quoted from the ARM? If we tried to redefine "int + int", wouldn't a "multiple definition of operator+(int,int)" be enough to tell us that we did a no-no? -- Dag B.