[clang-tools-extra] r315028 - [clangd] Attempt to fix compilation with MSVC.

Ilya Biryukov via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 5 15:15:15 PDT 2017


Author: ibiryukov
Date: Thu Oct  5 15:15:15 2017
New Revision: 315028

URL: http://llvm.org/viewvc/llvm-project?rev=315028&view=rev
Log:
[clangd] Attempt to fix compilation with MSVC.

Modified:
    clang-tools-extra/trunk/clangd/ClangdServer.h

Modified: clang-tools-extra/trunk/clangd/ClangdServer.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/ClangdServer.h?rev=315028&r1=315027&r2=315028&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/ClangdServer.h (original)
+++ clang-tools-extra/trunk/clangd/ClangdServer.h Thu Oct  5 15:15:15 2017
@@ -50,6 +50,9 @@ typedef std::string VFSTag;
 /// FileSystemProvider when this value was computed.
 template <class T> class Tagged {
 public:
+  // MSVC requires future<> arguments to be default-constructible.
+  Tagged() = default;
+
   template <class U>
   Tagged(U &&Value, VFSTag Tag)
       : Value(std::forward<U>(Value)), Tag(std::move(Tag)) {}
@@ -61,8 +64,8 @@ public:
   Tagged(Tagged<U> &&Other)
       : Value(std::move(Other.Value)), Tag(std::move(Other.Tag)) {}
 
-  T Value;
-  VFSTag Tag;
+  T Value = T();
+  VFSTag Tag = VFSTag();
 };
 
 template <class T>




More information about the cfe-commits mailing list