diff options
author | Reid Kleckner <rnk@google.com> | 2015-12-15 21:41:58 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2015-12-15 21:41:58 +0000 |
commit | 94db25b2d6d71ab3aa485357eccea0bc8c89650d (patch) | |
tree | adfad4e22aebd317def0b4ebd19a41bfb1473204 /include | |
parent | 08bfe00a1994610fe99bd27a914a480d8c0a4113 (diff) |
Fix clang-cl self-host with MSVC 2013 STL std::bind implementation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255678 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Support/ThreadPool.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/llvm/Support/ThreadPool.h b/include/llvm/Support/ThreadPool.h index 85c062179f0..5648db0642a 100644 --- a/include/llvm/Support/ThreadPool.h +++ b/include/llvm/Support/ThreadPool.h @@ -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 } |