The result is undefined because the A::a reference will point to a temporary variable created in line 2 and deleted there. Therefore, the result of the program is not defined after this line. An execution error may or may not occur in line 3, since undefined behaviour
Login in to like
Login in to comment