[clang-tools-extra] r365794 - [clangd] Avoid template in Task constructor, hopefully fix MSVC build
Sam McCall via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 11 09:26:54 PDT 2019
Author: sammccall
Date: Thu Jul 11 09:26:53 2019
New Revision: 365794
URL: http://llvm.org/viewvc/llvm-project?rev=365794&view=rev
Log:
[clangd] Avoid template in Task constructor, hopefully fix MSVC build
Modified:
clang-tools-extra/trunk/clangd/index/Background.h
Modified: clang-tools-extra/trunk/clangd/index/Background.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/index/Background.h?rev=365794&r1=365793&r2=365794&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/index/Background.h (original)
+++ clang-tools-extra/trunk/clangd/index/Background.h Thu Jul 11 09:26:53 2019
@@ -65,8 +65,7 @@ class BackgroundQueue {
public:
/// A work item on the thread pool's queue.
struct Task {
- template <typename Func>
- explicit Task(Func &&F) : Run(std::forward<Func>(F)){}
+ explicit Task(std::function<void()> Run) : Run(std::move(Run)) {}
std::function<void()> Run;
llvm::ThreadPriority ThreadPri = llvm::ThreadPriority::Background;
More information about the cfe-commits
mailing list