I don't understand

i = 2, ~i = -3
Last edited on
Whether this code is valid depends on what type i has and if i is a user-defined type whether operator ~ is overload such a way that it returns a lvalue.

If i has some fundamental type as for example int then the code shall not be compiled because ~i is prvalue.

EDIT: it is a very bad idea to remove the original post.
Last edited on
You're right, I put it back.
Topic archived. No new replies allowed.