If I have for example a class with instance method and variables
class Foo
{
...
int x;
int bar() { return x++; }
};
Is the behavior of returning a post-incremented variable defined?
Yes, it's equivalent to:
int bar()
{
int temp = x;
++x;
return temp;
}