------- Comment #3 from pinskia at gmail dot com 2010-09-03 19:02 ------- Subject: Re: New: Failure to bind auto variable to function template instance
I think there is a dup of this bug without auto. Not to mention it was defect report against the standard. On Sep 3, 2010, at 10:07 AM, "jewillco at osl dot iu dot edu" <gcc-bugzi...@gcc.gnu.org > wrote: > The following code: > > template <typename T> void foo(); > void f() {auto g = foo<int>;} > > fails to compile in GCC 4.5.0's C++0x mode with the following error: > > foo.cpp: In function âvoid f()â: > foo.cpp:2:20: error: âgâ has incomplete type > > Trying different variants of this code, it appears that GCC believes > that > foo<int> is an ambiguous overloaded function, while there is only > one matching > function. > > > -- > Summary: Failure to bind auto variable to function template > instance > Product: gcc > Version: 4.5.0 > Status: UNCONFIRMED > Severity: normal > Priority: P3 > Component: c++ > AssignedTo: unassigned at gcc dot gnu dot org > ReportedBy: jewillco at osl dot iu dot edu > GCC build triplet: x86_64-unknown-linux-gnu > GCC host triplet: x86_64-unknown-linux-gnu > GCC target triplet: x86_64-unknown-linux-gnu > > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45523 > -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45523