G
Guest
int i;
(char) i;
I am sure it is an rvalue. Just try this:
int i;
(char) i = 123; // error
However, on non-builtin types it is indeed an lvalue:
struct A { A(int) {} };
int i;
(A)i = (A)4;
The result is a temporary lvalue.
So, builtin types do not instantiate but classes do?
(char) i;
I am sure it is an rvalue. Just try this:
int i;
(char) i = 123; // error
However, on non-builtin types it is indeed an lvalue:
struct A { A(int) {} };
int i;
(A)i = (A)4;
The result is a temporary lvalue.
So, builtin types do not instantiate but classes do?