https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63364
--- Comment #2 from ncomputers.org <contact at ncomputers dot org> --- (In reply to Andrew Pinski from comment #1) > > B(A const*const&aa):a(aa){} > > > B*b=new B(this); > > > There is a temporary variable being created there and it goes out of scope > after the statement is finished. The reason is because this is not a > lvalue, prvalue. > > Here is the quote from the standard: > In the body of a non-static (9.3) member function, the keyword this is a > prvalue expression whose value > is the address of the object for which the function is called. Andrew, thank you for your answer! Yes it is true! We understand now better the reference variables. Can we write your name in our website? "Andrew Pinski taught us something new".