VS2010 C++ Template Member Functions in Lambdas Error - by Jason Meisel

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.


2
0
Sign in
to vote
ID 718297 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 1/12/2012 1:44:17 PM
Access Restriction Public
Moderator Decision Sent to Engineering Team for consideration

Description

Given a class with a templated member function, capturing "this" within a lambda function and trying to use the templated member function within it will result in odd errors. In a larger project I get error C2275 on the lines doing this. I have also created a small test case which gets error C2062.

However, both of these errors are fixed by explicitly calling the member function with "this->". That is, the implicit member function usage is what is broken.
Sign in to post a comment.
Posted by Microsoft on 1/13/2012 at 1:58 PM
Hi:
    A fix for this issue has been checked into the compiler sources. The fix should show up in the next release of Visual C++.

Xiang Fan
Visual C++ Team
Posted by MS-Moderator07 [Feedback Moderator] on 1/12/2012 at 8:42 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.
Posted by MS-Moderator01 on 1/12/2012 at 2:43 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)