aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--toolsrc/include/vcpkg/base/strings.h2
-rw-r--r--toolsrc/src/vcpkg/install.cpp6
2 files changed, 8 insertions, 0 deletions
diff --git a/toolsrc/include/vcpkg/base/strings.h b/toolsrc/include/vcpkg/base/strings.h
index dde4e9693..a147a8373 100644
--- a/toolsrc/include/vcpkg/base/strings.h
+++ b/toolsrc/include/vcpkg/base/strings.h
@@ -1,10 +1,12 @@
#pragma once
+
#include <vcpkg/base/cstringview.h>
#include <vcpkg/base/optional.h>
#include <vcpkg/base/stringliteral.h>
#include <vcpkg/base/stringview.h>
#include <vcpkg/base/view.h>
+#include <vcpkg/pragmas.h>
#include <vector>
diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp
index 165f13126..974e5f798 100644
--- a/toolsrc/src/vcpkg/install.cpp
+++ b/toolsrc/src/vcpkg/install.cpp
@@ -202,6 +202,12 @@ namespace vcpkg::Install
struct intersection_compare
{
+ // The VS2015 standard library requires comparison operators of T and U
+ // to also support comparison of T and T, and of U and U, due to debug checks.
+#if _MSC_VER < 1910
+ bool operator()(const std::string& lhs, const std::string& rhs) { return lhs < rhs; }
+ bool operator()(const file_pack& lhs, const file_pack& rhs) { return lhs.first < rhs.first; }
+#endif
bool operator()(const std::string& lhs, const file_pack& rhs) { return lhs < rhs.first; }
bool operator()(const file_pack& lhs, const std::string& rhs) { return lhs.first < rhs; }
};