aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/include
diff options
context:
space:
mode:
authorras0219 <533828+ras0219@users.noreply.github.com>2020-09-07 16:48:46 -0700
committerGitHub <noreply@github.com>2020-09-07 16:48:46 -0700
commita35ddddac86ec62fa25c7eea605bb4abf84eb705 (patch)
treeadbd4fb91a08b590b392eb23797d559b137b48f6 /toolsrc/include
parent0d0a84694c8c939e7ac12cae3975dd4c18ca71ec (diff)
downloadvcpkg-a35ddddac86ec62fa25c7eea605bb4abf84eb705.tar.gz
vcpkg-a35ddddac86ec62fa25c7eea605bb4abf84eb705.zip
[vcpkg] Fix compilation on VS2015 (#13398)
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
Diffstat (limited to 'toolsrc/include')
-rw-r--r--toolsrc/include/vcpkg/base/json.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/toolsrc/include/vcpkg/base/json.h b/toolsrc/include/vcpkg/base/json.h
index e4ce3210b..54f84f611 100644
--- a/toolsrc/include/vcpkg/base/json.h
+++ b/toolsrc/include/vcpkg/base/json.h
@@ -360,6 +360,10 @@ namespace vcpkg::Json
std::vector<std::string> m_errors;
struct Path
{
+ constexpr Path() = default;
+ constexpr Path(int64_t i) : index(i) { }
+ constexpr Path(StringView f) : field(f) { }
+
int64_t index = -1;
StringView field;
};
@@ -397,7 +401,7 @@ namespace vcpkg::Json
return false;
}
- m_path.push_back({-1, key});
+ m_path.push_back(key);
Optional<Type> opt = internal_visit(*value, visitor);
if (auto val = opt.get())