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

Status : 

  Won't Fix<br /><br />
		Due to several factors the product team decided to focus its efforts on other items.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 539800 Comments
Status Resolved Workarounds
Type Bug Repros 3
Opened 3/6/2010 10:40:31 AM
Access Restriction Public


Given the following code:

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

int main()

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()
Sign in to post a comment.
Posted by Microsoft on 4/1/2011 at 12:27 PM

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