[Bug c++/50086] New: Error on lookup of template function address with variadic template arguments
edward.schere@trash-mail.com
gcc-bugzilla@gcc.gnu.org
Mon Aug 15 12:18:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50086
Bug #: 50086
Summary: Error on lookup of template function address with
variadic template arguments
Classification: Unclassified
Product: gcc
Version: 4.6.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: edward.schere@trash-mail.com
G++ 4.6.1 fails to get the address of a template function if it's passed to a
variadic argument list:
template<typename T>
void tfun() { }
template<typename T>
void fun1(T(*)())
{
cout << "hello world" << endl;
}
template<typename... Types>
void fun2(Types... args)
{
fun1(args...);
}
int main()
{
fun1(tfun<int>); // ok, prints hello world
fun2(tfun<int>); // error: unresolved overloaded function type
return 0;
}
More information about the Gcc-bugs
mailing list