Community
cancel
Showing results for 
Search instead for 
Did you mean: 
drboon
Beginner
62 Views

[Bug Report] Variadic Template Member Functions and TRT

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
62 Views

 

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

Judy

Reply