This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/50086] New: Error on lookup of template function address with variadic template arguments


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;
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]