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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T05:40:18+00:00 2026-05-21T05:40:18+00:00

Can anyone explain this statement from ISO N3242 §3.2, 2nd point An expression is

  • 0

Can anyone explain this statement from ISO N3242 §3.2, 2nd point

An expression is potentially evaluated unless it is an unevaluated operand
(Clause 5) or a subexpression thereof. A variable or non-overloaded
function whose name appears as a potentially-evaluated expression is
odr-used unless it is an object that satisfies the requirements for appearing in a
constant
expression (5.19) and the lvalue-to-rvalue conversion (4.1) is
immediately
applied. this is odr-used if it appears as a potentiallyevaluated
expression
(including as the result of the implicit transformation in the body of
a
non-static member function (9.3.1)).

ISO Standard 2003 : says

An expression is potentially evaluated unless it appears where an
integral
constant expression is required (see 5.19), is the operand of the
sizeof
operator (5.3.3), or is the operand of the typeid operator and the
expression
does not designate an lvalue of polymorphic class type (5.2.8). An
object or
non-overloaded function is used if its name appears in a
potentially-evaluated
expression.

What is the actual difference in these statements?

Can any one explain this with the help of an example/program?

  • 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-21T05:40:19+00:00Added an answer on May 21, 2026 at 5:40 am

    “unevaluated operand” replaces “is the operand of the sizeof operator (5.3.3), or is the operand of the typeid operator and the expression does not designate an lvalue of polymorphic class type (5.2.8)”. It has the same basic purpose, but doesn’t try to list all the cases in the C++0x standard of operators whose operands aren’t evaluated. decltype is a new one, for example.

    “odr-used” replaces “used”, I presume they figured that “used” alone might be ambiguous with other uses of the word “use” in the standard. In both cases, though, it’s defining the sense of “used” which is relevant to the ODR.

    So those aren’t really changes, just re-wordings updated for C++0x.

    This is a change:

    A variable or non-overloaded function
    whose name appears as a
    potentially-evaluated expression is
    odr-used unless it is an object
    that satisfies the requirements for
    appearing in a constant expression
    (5.19) and the lvalue-to-rvalue
    conversion (4.1) is immediately
    applied.

    vs.

    An object or non-overloaded
    function is used if its name appears
    in a potentially-evaluated
    expression.

    Suppose a is a static const int at global scope. Then in C++03 it is not used in the following statement:

    char x[a];
    

    because the context requires a constant expression. However, it is used in the following:

    void foo(int); foo(a);
    

    because the context doesn’t require a constant expression.

    In C++0x, a is not odr-used in either case. It’s allowed to be in a constant expression, and in the function call, lvalue-rvalue conversion is immediately applied (because foo takes its parameter by value, not reference). So it qualifies for the “unless” which wasn’t present in C++03.

    There’s also a difference in the definition of “potentially evaluated”. In the first example, char x[a], a is potentially evaluated in C++03 but not in C++0x. I haven’t checked whether anything else in the standard uses “potentially evaluated”, that might be affected by this change. If it’s only mentioned here then that part of it isn’t a change, it’s just that the exception has been moved from “potentially evaluated” to “used”.

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

Sidebar

Related Questions

Can anyone explain this statement from ISO N3242 §3.2, 2nd point A member of
Can anyone explain this statement from ISO N3242 §3.2, 2nd point A non-placement allocation
Can anyone explain to me the purpose of ungetch? This is from K&R chapter
Can anyone explain what this mod_rewrite rule is doing? I'm trying to comment the
Can anyone explain why this code gives the error: error C2039: 'RT' : is
Can anyone explain to me what this means? Run-Time Check Failure #0 - The
Can anyone explain to me why this isn't working? #include <stdio.h> #include <stdlib.h> char
This is the statement from ISO C++ Standard 14.6/6: Within the definition of a
Can anyone explain how to run PHP code from within javaScript for submit? Currently
anyone can explain how to use for...in statement in javascript. I had read the

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.