Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

[Bug Report] Variadic Template Member Functions and TRT

drboon
Beginner
405 Views

Hi there,

ICC 14.0 (Windows) fails to compile when you try to invoke a varadic template member function with a trailing return type; the non-member or non-TRT version both compile though.

[cpp]

struct A
{

    template<typename... Args>

    int f(Args...);

};

template<typename... Args>
auto A::f(Args...) -> int
{
    return 0;
}

int main()
{
    A a;
    a.f();
    return 0;
}

[/cpp]

[bash]

1>main.cpp(16): error : no instance of function template "A::f" matches the argument list
1> object type is: A
1> a.f();
1> ^
1>
1> compilation aborted for main.cpp (code 2)

[/bash]

Do I get a cookie now? :-)

0 Kudos
1 Reply
Judith_W_Intel
Employee
405 Views

 

Thank you for reporting this and providing a small example. I have entered this in our bug tracking database as DPD200248063.

Judy

0 Kudos
Reply