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

  • Home
  • SEARCH
  • 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 6721427
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:19:45+00:00 2026-05-26T09:19:45+00:00

What does a standard say about extending a C++ language and adding ‘non standard’

  • 0

What does a standard say about extending a C++ language and adding ‘non standard’ keywords? Do the keyword have to start with __ (double underscore) or can the be ‘regular’, meaning starting with a letter? If I would about to create extension to C++ and have a new keyword do I have to make it look like this:

__new_keyword  

or can it be just simple:

new_keyword.  

Thanks.

  • 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-26T09:19:45+00:00Added an answer on May 26, 2026 at 9:19 am

    The standard says that identifiers with two underscores are reserved for the compiler. So if you want a safe way to add language extensions in your C++ compiler, that would be one way to do it. Be advised that if you’re just writing a pre-processor, the compiler you use may conflict with what you choose. But since the pre-processed code should be fairly simple, it shouldn’t be a problem.

    IF I’m creating extension to C++ CAN I use keywords starting with a letter OR do I have to start them with underscore?

    You CAN do whatever you want, because it won’t be C++ and therefore does not have to conform to anything. However, if you want to keep conflicts with user-created names to a minimum, the standard says that identifiers that begin with two underscores are reserved by the C++ implementation, as are identifiers that begin with an underscore followed by a capital letter.

    Note that this will only stop you from conflicting with user code. You can still conflict with your standard library implementation or whatever compiler you’re working with.

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

Sidebar

Related Questions

Does the standard have anything to say about an exception that is caught by
When using HTTP/1.1 Pipelining what does the standard say about issuing multiple requests without
What does the C++ standard say about using dollar signs in identifiers, such as
Possible Duplicate: Safety concerns about short circuit evaluation What does the standard say about
what does standard say about such case: template<class C> struct A { A(C c
Does VS2008 have somewhat C++0x standard support? DUPLICATE Visual Studio support for new C
Does ASP.NET MVC provide a standard validator functionality or do you have to create
Does a standard or normal diff format exist in SVN or only the unified
Does the standard guarantee that order of equal elements will not change (eh, forgot
Does the C standard support something similar to __func__ for the function arguments' names?

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.