Incorrect parsing of pointer to array return types in trailing return type template functions - by No_Unique_Usernames

Status : 

  Fixed<br /><br />
		This item has been fixed in the current or upcoming version of this product.<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 717318 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 1/7/2012 12:43:43 AM
Access Restriction Public


Pointer to array returns types are parsed correctly in regular trailing return type functions, but not in template functions. I.e., of the following two functions declarations, the first one compiles correctly but the second one causes error C2059:

auto MyFunc() -> int(*)[4] {
	return nullptr;

template<class A>
auto MyFunc2(A* pParam) -> int(*)[4] {
	return nullptr;
Sign in to post a comment.
Posted by Microsoft on 1/13/2012 at 9:16 AM
Hi: this issue has been fixed. The fix should show up in a future release of Visual C++.

Thank you for reporting the issue.

Jonathan Caves
Visual C++ Compiler Team
Posted by MS-Moderator10 [Feedback Moderator] on 1/8/2012 at 6:06 PM
Thank you for submitting feedback on Visual Studio 2010 and .NET Framework. Your issue has been routed to the appropriate VS development team for investigation. We will contact you if we require any additional information.
Posted by MS-Moderator01 on 1/7/2012 at 1:44 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(