lvalue

Where in the C++ Standard does it say ::delete can change lvalues?

I ran into my first compiler that changes the lvalue passed to ::delete, but doesn't zero out the lvalue. That is the following is true: Foo * p = new Foo(); Foo * q = p; assert(p != 0); assert(p == q); ::delete p; assert(p != q); assert(p != 0); Note that p is not zero after the delete operation, and it has changed from it's o...

Problem by a reference variable of a template parameter

The following small example shows my problem: template<class T> struct X { static void xxx(T& x) { } static void xxx(T&& x) { } }; int main(int argc, char** argv) { int x = 9; X<int>::xxx(x); // OK. X<int&>::xxx(x); // ERROR! return 0; } Error message (GCC): error: ‘static void X::xxx(T&&) [with T = int&]’...

What are rvalues, lvalues, xvalues, glvalues, and prvalues?

In C++03, an expression is either an rvalue or an lvalue. In C++0x, an expression can be an: rvalue lvalue xvalue glvalue prvalue Two categories have become five categories. What are these new categories of expressions? How do these new categories relate to the existing rvalue and lvalue categories? Are the rvalue and lvalu...

Correlation between specifier and qualifier?

const and volatile are called cv-qualifier by the C spec. What is exactly defference between specifier and qualifier (cv-qualifier)? Does 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 above understanding makes any sense? ...

what is the Rvalue and Lvalue in c

Possible Duplicates: What are rvalues, lvalues, xvalues, glvalues, and prvalues? lvalue and rvalue difference between c's expression and c++'s expression On executing the program below, I got error an message like "required Lvalue is missing in main function" main() { int i; printf("%d",++i++); } Please tell me ...

Array and Rvalue

$4.2/1 - "An lvalue or rvalue of type “array ofN T” or “array of unknown bound of T” can be converted to an rvalue of type “pointer to T.” The result is a pointer to the first element of the array." I am not sure how do we get an rvalue of an array type other than during initialization/declaration? ...

Templates Non Type Parameters+ Lvalue/Rvalue

C++03 $14.1/6 - "A non-type non-reference template-parameter is not an lvalue." C++0x $14.2/6- "A non-type non-reference template-parameter is an rvalue." Is there any specific rationale behind rewording it? ...

lvalue required

what does the error message "Lvalue required" actually mean? ...

Difference between C++ const refernces and consts?

What is the difference between: const double& pi = 3.14; and (no ampersand): const double pi = 3.14; They both seem to have the same L and R values so what is the difference? Thanks. ...

How to change the value of an NSMutableArray at a particular index

[array objectAtIndex:i] doesn't work as an L value, so it can't be used to set the object at index i. ...

using l-value with abstract class

I'm having issue with calling a method with l-value of an abstract class. The class definition is: class SimulatorSequenceItemBase { public: SimulatorSequenceItemBase(); virtual ~SimulatorSequenceItemBase(); virtual uint32_t GetResult(uint32_t p_nSite) = 0; virtual bool MoveNext(SimulatorSequenceItemBase& p_rNext) = 0; ...