[Bug Report] Variadic Template Member Functions and TRT

[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.

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

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)

Do I get a cookie now? :-)

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

 

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

Judy

Leave a Comment

Please sign in to add a comment. Not a member? Join today