#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;}
Visual Studio/Team Foundation Server/.NET Framework Tooling version
Steps to reproduce
Product Language
Operating System
Operating System Language
Actual results
Expected results
Please wait...