From e81b76253dbd98d7b7f19325975abaf0b681f401 Mon Sep 17 00:00:00 2001 From: Ilya Biryukov Date: Thu, 5 Oct 2017 22:15:15 +0000 Subject: [PATCH] [clangd] Attempt to fix compilation with MSVC. llvm-svn: 315028 --- clang-tools-extra/clangd/ClangdServer.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/clang-tools-extra/clangd/ClangdServer.h b/clang-tools-extra/clangd/ClangdServer.h index ae510c97c9f3..7bdc0c28c3c6 100644 --- a/clang-tools-extra/clangd/ClangdServer.h +++ b/clang-tools-extra/clangd/ClangdServer.h @@ -50,6 +50,9 @@ typedef std::string VFSTag; /// FileSystemProvider when this value was computed. template class Tagged { public: + // MSVC requires future<> arguments to be default-constructible. + Tagged() = default; + template Tagged(U &&Value, VFSTag Tag) : Value(std::forward(Value)), Tag(std::move(Tag)) {} @@ -61,8 +64,8 @@ public: Tagged(Tagged &&Other) : Value(std::move(Other.Value)), Tag(std::move(Other.Tag)) {} - T Value; - VFSTag Tag; + T Value = T(); + VFSTag Tag = VFSTag(); }; template