🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #808

Re: request for comments

#808
From: Steven King
Date: Sat, 02 Feb 1991 16:55
25 lines
1487 bytes
In article <70305@microsoft.UUCP> jimad@microsoft.UUCP (Jim ADCOCK) writes:
>
>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."

   There are is a problem with allowing operator overloading, or even
 operators at all, on enums. Given 

 enum modes { rd_ok = 1, wr_ok = 2, ex_ok = 4 } ;

 for ( modes m = rd_ok ; m < ex_ok ; m++ ) // this is accepted by Cfront 2.0!

   What does _m++_ do? The problem with arbitrary arithmatic manipulations
 of enum's are alluded to in ARM ( sorry, dont have the # ).

-- 
                                        ..!cs.utexas.edu!ut-emx!nowhere!sking

been dazed and confused for so long its true; wanted an OS, never bargined for
you. Lotsa people hacking, few of them know, kernal of unix was created below...
Technical Details
Message-ID: <1991Feb02.165526.1933@nowhere.uucp>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!cs.utexas.edu!ut-emx!nowhere!sking
References: <21@microsoft.UUCP> <95@tdatirv.UUCP> <70305@microsoft.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!cs.utexas.edu!ut-emx!nowhere!sking
From: sking@nowhere.uucp (Steven King)
Newsgroups: comp.std.c++
Subject: Re: request for comments
Message-ID: <1991Feb02.165526.1933@nowhere.uucp>
Date: 2 Feb 91 16:55:26 GMT
References: <21@microsoft.UUCP> <95@tdatirv.UUCP> <70305@microsoft.UUCP>
Organization: Anarchists Union
Lines: 25