diff options
Diffstat (limited to 'toolsrc/include')
| -rw-r--r-- | toolsrc/include/vcpkg/base/json.h | 6 |
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()) |
