Home Dashboard Directory Help
Search

shared_ptr and lambda function crash with C1001 by 8Ika1oikXJA8H


Status: 

Closed
 as Fixed Help for as Fixed


1
0
Sign in
to vote
Type: Bug
ID: 706674
Opened: 11/20/2011 3:25:08 PM
Access Restriction: Public
Moderator Decision: Sent to Engineering Team for consideration
0
Workaround(s)
view
0
User(s) can reproduce this bug

Description

#include <memory>
// this code generates a C1001
// but comment the line defining data and uncomment the line above and it compiles
// this construct is important for passing data when persistence is an issue in multithreading
//
int main()
{
    //typedef int data;
    struct data {};
    std::shared_ptr<data> p = std::shared_ptr<data>(new data);
    [=](){data& record = *p;};
    return 0;
}
Details
Sign in to post a comment.
Posted by Microsoft on 4/29/2014 at 12:24 PM
Thank you for reporting this issue. This issue has been fixed in Visual Studio 2013. You can install a trial version of Visual Studio 2013 with the fix from: http://go.microsoft.com/?linkid=9832436
Posted by Microsoft on 11/21/2011 at 11:10 AM
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-Moderator09 [Feedback Moderator] on 11/20/2011 at 7:24 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 review. We will contact you if we require any additional information.
Posted by MS-Moderator01 on 11/20/2011 at 3:44 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)
Sign in to post a workaround.