This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/50086] New: Error on lookup of template function address with variadic template arguments
- From: "edward dot schere at trash-mail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 15 Aug 2011 12:13:47 +0000
- Subject: [Bug c++/50086] New: Error on lookup of template function address with variadic template arguments
- Auto-submitted: auto-generated
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;
}