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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T22:16:06+00:00 2026-05-24T22:16:06+00:00

This code is accepted by MSVC9.0. My question is whether it is legal according

  • 0

This code is accepted by MSVC9.0. My question is whether it is legal according to the standard (the old and/or the new one). A quote would be very much welcome, too.

class X
{
   void X::f();
};
  • 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-24T22:16:06+00:00Added an answer on May 24, 2026 at 10:16 pm

    No, this is not valid. Here, X::f is a qualified name; you are attempting to use it as a declarator-id. C++03 8.3[dcl.meaning]/1 lists the circumstances under which a declarator-id may be qualified:

    A declarator-id shall not be qualified except for

    • the definition of a member function or static data member outside
      of its class,

    • the definition or explicit instantiation of a function or variable member of a namespace outside
      of its namespace, or

    • the definition of a previously declared explicit specialization outside of its namespace, or

    • the declaration of a friend function that is a member of another class or namespace.

    Because X::f falls into none of these four categories, it is incorrect.

    The rule that requires the definition of a member function outside of the class definition to be qualified can be found at C++03 9.3[class.mfct]/5:

    If the definition of a member function is lexically outside its class definition, the member function name shall be qualified by its class name using the :: operator.

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

Sidebar

Related Questions

this code always returns 0 in PHP 5.2.5 for microseconds: <?php $dt = new
I use the following jQuery (1.4) code to test whether cookies are accepted: $.get(http://localhost:8080/cookietester/cookietester,
Consider this code: class Outer { class Inner } In Java it would be
I have a question about the accepted answer for this question. Could you explain
According to MSDN here and here (as well as the accepted answer to this
I was trying to answer this question. As suggested by the accepted answer, the
So I tested this code (intersection between two ellipses, look at the accepted answer),
Suppose I have this code: static void Main(string[] args) { var thread = new
How would you say :not(this) in the case of this code: $(.draghandle).droppable({ accept: .draghandle:not(this)
This question comes from this one: c++ pass array to function question but since

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.