mirror of
https://github.com/nlohmann/json.git
synced 2026-10-16 19:18:12 +00:00
Fix MSVC 2015 failures on AppVeyor
- object_capacity() (#5832) overloaded a static with a non-static member function template, which MSVC 2015 rejects (C2686); make all three overloads non-static. - The JSON pointer hash constants (#5836) truncate on 32-bit size_t (C4309 with /WX); mask them to size_t's range before the cast. - unit-diagnostics: MSVC 2015 cannot use-declare the base's Container typedef (C2886); use alias declarations instead. Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
4 files changed
+10
-10
No files matched your search
@@ -1225,7 +1225,7 @@ public:
|
||||
}
|
||||
|
||||
template < typename O = object_t, detail::enable_if_t < detail::has_stable_elements<O>::value, int > = 0 >
|
||||
static constexpr std::size_t object_capacity() noexcept
|
||||
std::size_t object_capacity() const noexcept
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -1237,7 +1237,7 @@ public:
|
||||
}
|
||||
|
||||
template < typename O = object_t, detail::enable_if_t < !detail::has_stable_elements<O>::value && !detail::is_nlohmann_ordered_map<O>::value, int > = 0 >
|
||||
static constexpr std::size_t object_capacity() noexcept
|
||||
std::size_t object_capacity() const noexcept
|
||||
{
|
||||
return detail::unknown_size();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user