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: unassig...@gcc.gnu.org
        ReportedBy: edward.sch...@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;
}

Reply via email to