Fix clang-cl self-host with MSVC 2013 STL std::bind implementation

llvm-svn: 255678
This commit is contained in:
Reid Kleckner 2015-12-15 21:41:58 +00:00
parent c8a81bcc44
commit f034b3c900

View File

@ -70,7 +70,12 @@ public:
#ifndef _MSC_VER #ifndef _MSC_VER
return asyncImpl(std::move(Task)); return asyncImpl(std::move(Task));
#else #else
return asyncImpl([Task] (VoidTy) -> VoidTy { Task(); return VoidTy(); }); // This lambda has to be marked mutable because MSVC 2013's std::bind call
// operator isn't const qualified.
return asyncImpl([Task](VoidTy) mutable -> VoidTy {
Task();
return VoidTy();
});
#endif #endif
} }