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