Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6675983
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:55:47+00:00 2026-05-26T03:55:47+00:00

While qualifying an enumeration value with the name of the enumeration is not valid

  • 0

While qualifying an enumeration value with the name of the enumeration is not valid C++03, it is valid C++11, from what I understand. Despite this, MSVC 10 generates warning C4482 for the following:

enum E { A, B };

int i = E::A;  // warning C4482 (but valid C++11?)

Since much of our code uses C++11 features (especially lambdas), it seems safe to disable this warning. Am I right that the code is valid C++11?

Note: I did not write the code in question, and I would prefer to not go through and change every occurrence of this.

Edit: Added some relevant links.

  • MSDN page for the warning.
  • Another question about the warning. The question and answers all seem to reference C++03.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T03:55:48+00:00Added an answer on May 26, 2026 at 3:55 am

    Since much of our code uses C++11 features (especially lambdas), it seems safe to disable this warning.

    If you’re already relying on C++11 features, then yes. C++11 does allow you to use regular enums scoped by the enumeration’s name. Microsoft had this as an extension for some time, so they issued a warning about the non-standard behavior.

    So you can disable it.

    Note that older compilers like VC2010, instead of warning, did raise compile error C2653 (with message "… is not a class or namespace name").

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

While going through university and from following the development of SO, I've heard a
While troubleshooting a misbehavior in Spree where the product list was not paginating and
While calling XslCompiledTransform.Transform() method I get this exception : The Writer is closed or
While trying to call an EJB made using NETbeans (using jdk1.7) from a client
While database design I used a field name deleted and use it as Boolean.
while reading cocoa fundamental guide i have gone through: (void)addObserver:(id)notificationObserver selector:(SEL)notificationSelector name:(NSString *)notificationName object:(id)notificationSender
While reading answers to this question I noticed that answers ( this for example)
While fetching Boolean data from database with hibernate SQL query gives the following error
While working with some jQuery ajax, I've run into this problem with Chrome and
while i'm using push notification in iphone with local server(used php), not able to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.