By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,167 Members | 1,068 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,167 IT Pros & Developers. It's quick & easy.

C++0x and Enumerated Subtypes

P: n/a
Does anyone know if C++0x will address the issue of enumerated subtypes?

That is, if I have an enum, and want a type-compatible subtype of it....

Something along the lines of

enum Day {
Sunday,
Monday,
Tuesday,
Wednesday,
Thursday,
Friday,
Saturday
};

and I want to create a subtype that's just the weekdays (Monday through
Friday). However, I don't want to have to do casting between the two.
This is equivalent to the Ada subtype construct.

Will C++0x support something like this?

Sep 29 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
red floyd wrote:
Does anyone know if C++0x will address the issue of enumerated subtypes?

That is, if I have an enum, and want a type-compatible subtype of it....

Something along the lines of

enum Day {
Sunday,
Monday,
Tuesday,
Wednesday,
Thursday,
Friday,
Saturday
};

and I want to create a subtype that's just the weekdays (Monday through
Friday). However, I don't want to have to do casting between the two.
This is equivalent to the Ada subtype construct.

Will C++0x support something like this?
You might want to ask on comp.std.c++ instead.

Cheers! --M

Sep 29 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.