- the -- operator-function overloaded for list iterator takes a non-const reference, right?
This point is wrong. The operator--
is a member function, and a member function can be invoked on a temporary. You don't pass any object to this member function as argument. so the question of binding rvalue to non-const reference doesn't arise in the first place.
As for the edit (passing rvalue to f(A&){}
), it is a non-standard extension. I guess you're using Microsoft Compiler, because I know it has this non-standard extension which is stupid in my opinion.