Absence of conversion operator-function to pointer to function in lambda-expression. - by Сыроежка

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 724616 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 2/12/2012 12:19:56 PM
Access Restriction Public


According to the paragraph 5.1.2 "Lambda expressions" p.6 of the C++ 2011 Standard "The closure type for a lambda-expression with no lambda-capture has a public non-virtual non-explicit const conversion function to pointer to function having the same parameter and return types as the closure type’s function call operator. The value returned by this conversion function shall be the address of a function that, when invoked, has the same effect as invoking the closure type’s function call operator."
However the VC++ 2010 compiler issues error "error C2440: инициализация: невозможно преобразовать "`anonymous-namespace'::<lambda0>" в "void (__cdecl *)(int)"
 Для выполнения данного преобразования нет доступного оператора преобразования, определенного пользователем, или вызов оператора невозможен"
Sign in to post a comment.
Posted by Microsoft on 2/13/2012 at 12:52 PM
Thank you for reporting this issue to Microsoft. We're glad to say that it's already been fixed and the fix will be available in the next release of the compiler.

Tanveer Gani
Visual C++ Team
Posted by MS-Moderator08 [Feedback Moderator] on 2/12/2012 at 10:20 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 2/12/2012 at 12:41 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)