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 6602365
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:52:05+00:00 2026-05-25T18:52:05+00:00

I can remember that during the discussion about general attributes which finally lead to

  • 0

I can remember that during the discussion about general attributes which finally lead to the new contextual keywords override and final it was suggested that compiler support for these ore some may be optional (I guess it would read in the standard text as “behavior is implementation-specific). But I can not find any trace about this optionality in the FDIS and the corrections afterwards.

But since not finding it is not proof, I have to ask: Is the support as described in 2.11p2, 9.2 and 10.3 of the FDIS for override and final obligatory for a conforming compiler?

Is it for example required that a conforming compiler rejects

class Foo {
    void func() override; // Error: not virtual, 9.2p9
};

Or is it still conforming by ignoring override?

  • 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-25T18:52:06+00:00Added an answer on May 25, 2026 at 6:52 pm

    Yes, it’s required that override is not ignored by a conforming implementation. First, override can only appear in the declaration of a virtual member function.

    9.2/9:

    […] A virt-specifier-seq shall appear only in the declaration of a virtual member function.

    Second, a virtual function which doesn’t override a member function of a base class but is marked override makes the program ill-formed.

    10.3/7:

    If a virtual function is marked with the virt-specifier override and does not override a member function of a base class, the program is ill-formed.

    As both are diagnosable rules of the standard it is illegal for a conforming compiler to ignore violations. (1.4/1)

    The same reasoning applies to final and the relevant requirements are in 9 [class]/3 and 10.3 [class.virtual]/4.

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

Sidebar

Related Questions

In a discussion with co-workers today, I lamented that I can't ever remember what
I remember reading briefly that you can add assembly attributes so that you can
I can remember that some time ago when I created a UserControl in Visual
I read somewhere (I can't remember where) that it is possible, in certain circumstances,
I can't find a reference to it but I remember reading that it wasn't
I remember reading somewhere that you can provide your own icons without having them
I can't, for the life of me, remember what exactly our teacher said that
I can remember Convert class in .net which is named not in accordance with
For as long as I can remember I have avoided using switch statement fall-through.
I didn't remember the name of this program. But i can remember how it

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.