🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Inheritance for enum types ???

#1323
From: richard.henderson~
Date: Sun, 26 May 1991 07:58
23 lines
1282 bytes
In article <5701@lupine.NCD.COM> rfg@lupine.ncd.com (Ron Guilmette) writes:
>Sometimes though, it would be nice to be able to do something like this,
>e.g. when you want to have one type which refers to a whole big range
>of enumerator values, and yet another type which represents some "subrange"
>of the larger range of enumerator values.

[ deleted ]

>So I was thinking... this sounds like a job for ... ta da!  Inheritance!
>
>Does anybody (other than me) think that this might be a good idea?
>
>After all, in C++ we *do* now have strict type checking for enum types,
>however we *don't* have anything like Pascal subranges.

I have wanted something like this for some time.
It would be nice to have the derived enumerator's first indentifier
automagicly be one more than the last identifier of it's base.

I think that I could have made use of such a thing had it existed.

----------
richard~
Technical Details
Message-ID: <16542@helios.TAMU.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!helios!stat!richard
References: <5701@lupine.NCD.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!helios!stat!richard
From: richard@stat.tamu.edu (richard.henderson~)
Newsgroups: comp.std.c++
Subject: Re: Inheritance for enum types ???
Message-ID: <16542@helios.TAMU.EDU>
Date: 26 May 91 07:58:03 GMT
References: <5701@lupine.NCD.COM>
Sender: usenet@helios.TAMU.EDU
Lines: 23