// PR c++/50442 template struct MoveRef { operator T& () {} }; template MoveRef Move(T&) {} struct Thing {}; Thing foo(const Thing* p) { return Thing(Move(*p)); }