Re: C++ PATCH for c++/47999 (incorrect auto deduction in template)

2011-03-16 Thread H.J. Lu
On Wed, Mar 16, 2011 at 9:23 AM, Jason Merrill wrote: > In templates, we do overload resolution and then throw away most of it, > going back to the pre-conversion arguments.  But when the call returns a > reference, we shouldn't elide the dereference and pretend it returns by > value, as that conf

C++ PATCH for c++/47999 (incorrect auto deduction in template)

2011-03-16 Thread Jason Merrill
In templates, we do overload resolution and then throw away most of it, going back to the pre-conversion arguments. But when the call returns a reference, we shouldn't elide the dereference and pretend it returns by value, as that confuses lvalue_p. Tested x86_64-pc-linux-gnu, applying to tru