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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T18:05:28+00:00 2026-05-16T18:05:28+00:00

const and volatile are called cv-qualifier by the C spec. What is exactly defference

  • 0

const and volatile are called cv-qualifier by the C spec.

What is exactly defference between specifier and qualifier (cv-qualifier)? Is a qualifier is a specifier as well?

Is it necessarry that qualifier is with an lvalue only?

What are qualifiers other than cv-qualifier?

Does my above understanding make any sense?

  • 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-16T18:05:28+00:00Added an answer on May 16, 2026 at 6:05 pm

    Most of it doesn’t make sense.

    Specifier and qualifier are defined in the C++ standard. Qualifier is just an integral part of a specifier. For example, type specifier in a declaration can include cv-qualifiers. I don’t see the reason to quote everything from the standard on this topic.

    Cv-qualifiers are not restricted to lvalues. Rvalues of class types can also be cv-qualified. It is possible to cv-qualify an rvalue of non-class type, but it will have no effect and will be ignored.

    The use of const qualifier that you show in your example with foo is just a syntactic form, which actually means that the const-qualifier is applied to the implied this parameter of the foo method: const A* this. I.e. in this case it does indeed qualify an lvalue, but it is *this, not foo.

    The term qualifier also appears in the context of qualified names. Name like some_class::some_member (or some_namespace::some_name) are called qualified names and the some_class:: part is a qualifier.

    The idea that if something is an lvalue then you can modify it is totally incorrect. There are modifiable lvalues and non-modifiable lvalues. An object declared as const int i = 5 is an lvalue, yet you can’t modify it. Ordinary functions are also lvalues in C++, yet you can’t modify a function.

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

Sidebar

Related Questions

According to the standard (§5.2.11) a const_cast casts away cv-qualifiers (const or volatile). Here's
What are the differences between const and volatile pointer in C?
I'm reading a book called C++ Gotchas which explains the conversions between const pointers
I heard that volatile is factor of overloading like const. If a function is
I saw this code snippet const volatile int * volatile * const X; but
I have a const int that is computed at compile time in my Managed
I can see practical use for a const volatile qualified variable, like const volatile
Well, I have to revive a question that was answered here before. I've made
Example from MSVC's implementation: #define offsetof(s,m) \ (size_t)&reinterpret_cast<const volatile char&>((((s *)0)->m)) // ^^^^^^^^^^^ As
Consider this C code: extern volatile int hardware_reg; void f(const void *src, size_t len)

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.