Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[enh] fix issue 10965 - Allow alias initializer as enum member to avoid counter reset #2529

Closed
wants to merge 1 commit into from

Conversation

hpohl
Copy link
Contributor

@hpohl hpohl commented Sep 7, 2013

@@ -0,0 +1,33 @@
enum E1
{
alias a,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a little more than what the enhancement request is about, it's also a very special case compared to what alias usually does, I think we shouldn't go this far.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking about this, too. So initializers are needed for alias members?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They're supposed to refer to existing members, e.g. alias b = a;.

Anyway, it's kind of fast to implement this already, since I've just filed the enhancement. Maybe a NG discussion should be made first to get a go-ahead.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well I've posted to the newsgroups. I don't have high hopes that it will be accepted. However Issue 9395 is something that can easily pass through. If you want to have a go at it, you might want to see Pull 463 for a reference.

@WalterBright
Copy link
Member

n.g. hasn't been positive about this enhancement. I'll leave it up a bit longer, and if it doesn't improve, will close it.

@ghost
Copy link

ghost commented Sep 8, 2013

I think we can already close it, I've reached the same conclusions as others, too little gain for this feature. Sorry for the wasted work @hpohl !

@hpohl
Copy link
Contributor Author

hpohl commented Sep 9, 2013

No problem.

@hpohl hpohl closed this Sep 9, 2013
WalterBright added a commit that referenced this pull request Aug 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants