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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:36:16+00:00 2026-05-23T08:36:16+00:00

The error message seems to be little mis-leading with the scenario, when we try

  • 0

The error message seems to be little mis-leading with the scenario, when we try to delete a virtual method.

prog.cpp:4:16: error: deleted function 'virtual void Test::foo()'
prog.cpp:8:2: error: used here

Code

struct Test : public Base
{
  Test() {}
  virtual void foo () = delete;  // error
};

Are virtual method not deleteable for the same reason, why they cannot remain unimplemented in C++03 ? Is there any way to mention that Test purposely not implementing virtual foo() ?

  • 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-23T08:36:16+00:00Added an answer on May 23, 2026 at 8:36 am

    The term use has a concrete definition in the standard, and in particular for virtual functions the definition of odr-used is:

    §3.2/2 (C++0x FDIS) […]A virtual member function is odr-used if it is not pure.[…]

    Where odr-used is a new term in the upcoming standard that refers to what the previous standard called plainly used:

    §3.2/2 (current standard) […]A virtual member function is used if it is not pure.[…]

    My take is that the error message employs the term used to refer to odr-used in this particular case, and yes, the reason why this is a violation is exactly the same reason by which you cannot leave a non-pure virtual member function unimplemented.

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

Sidebar

Related Questions

Seems like cuke doesn't show the full error message (at least when problem occurs
The error message I am getting is: The type arguments for method 'System.Linq.Queryable.Contains(System.Linq.IQueryable, TSource)'
The error message I gen when I try to access the web page server
I'm getting the following error message and I can't seem to figure out the
Error message: fatal: git checkout: updating paths is incompatible with switching branches/forcing How to
Error message doesn't display on mysql connect failure if( ! $this->remote_connection_id = @mysql_connect($vars['hostname'], $vars['username'],
This error message appears on a colleague's machine when he tries to launch a
Parser Error Message: The entry 'SiteSqlServer' has already been added. Source Error: Line 23:
My Error message: Request for member nameField in something not a struct or union
I am getting this error message (shown in title), when I run this SQL

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.