From a35ddddac86ec62fa25c7eea605bb4abf84eb705 Mon Sep 17 00:00:00 2001 From: ras0219 <533828+ras0219@users.noreply.github.com> Date: Mon, 7 Sep 2020 16:48:46 -0700 Subject: [vcpkg] Fix compilation on VS2015 (#13398) Co-authored-by: Robert Schumacher --- toolsrc/include/vcpkg/base/json.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'toolsrc/include') 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 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 opt = internal_visit(*value, visitor); if (auto val = opt.get()) -- cgit v1.2.3