This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/47999] [C++0x] auto type deduction works incorrectly in a function template
- From: "jason at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 8 Mar 2011 15:14:06 +0000
- Subject: [Bug c++/47999] [C++0x] auto type deduction works incorrectly in a function template
- Auto-submitted: auto-generated
- References: <bug-47999-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47999
--- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> 2011-03-08 15:14:02 UTC ---
Created attachment 23583
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23583
Fix
Here's a patch that fixes the bug and passes regression testing. I don't plan
to put it in for 4.6.0 as I'm concerned about possible side-effects; I seem to
remember trying to do exactly this once before and it causing problems. I'll
put it in for 4.7 once 4.6 branches, and then perhaps into 4.6.1.