Home Dashboard Directory Help
Search

C++ IntelliSense erroneously reports no matching overload for function templates with trailing return type by James McNellis


Status: 

Resolved
 as Won't Fix Help for as Won't Fix


2
0
Sign in
to vote
Type: Bug
ID: 539800
Opened: 3/6/2010 10:40:31 AM
Access Restriction: Public
0
Workaround(s)
view
3
User(s) can reproduce this bug

Description

Given the following code:

template <typename T>
auto foo(T x) -> decltype(x)
{
    return x;
}

int main()
{
    foo(42);
}

IntelliSense erroneously reports the following error:

"IntelliSense: no instance of function template "foo" matches the argument list"

There is no problem with nontemplate functions that have trailing return types, and the following example results in no IntelliSense error:

auto bar(int x) -> decltype(x)
{
    return x;
}

int main()
{
    bar(42);
}
Details
Sign in to post a comment.
Posted by Microsoft on 4/1/2011 at 12:27 PM
Hello,

Thanks for reporting this issue. We appreciate your feedback and are constantly trying to improve our products based on it. We are moving bug databases. We are tracking this bug in the new database. Thus, we are closing this.

Best Regards,
Visual C++ Team
Posted by Microsoft on 3/7/2010 at 6:45 PM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.

Thank you
Sign in to post a workaround.