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 d7045faa10
commit b6dfee2d73
1 changed files with 6 additions and 1 deletions

View File

@ -70,7 +70,12 @@ public:
#ifndef _MSC_VER
return asyncImpl(std::move(Task));
#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
}