1
0
mirror of https://github.com/nlohmann/json synced 2024-11-23 20:40:08 +00:00

🚨 fix warning

This commit is contained in:
Niels Lohmann 2024-04-14 12:38:17 +02:00
parent 760f54f993
commit e8cfe1f712
No known key found for this signature in database
GPG Key ID: 7F3CEA63AE251B69
3 changed files with 15 additions and 3 deletions

View File

@ -380,6 +380,12 @@ inline void from_json(const BasicJsonType& j, ArithmeticType& val)
}
}
template<typename BasicJsonType, typename... Args, std::size_t... Idx>
std::tuple<Args...> from_json_tuple_impl_base(const BasicJsonType& j, index_sequence<Idx...> /*unused*/)
{
return std::make_tuple(j.at(Idx).template get<Args>()...);
}
template<typename BasicJsonType, typename... Args, std::size_t... Idx>
std::tuple<Args...> from_json_tuple_impl_base(BasicJsonType&& j, index_sequence<Idx...> /*unused*/)
{

View File

@ -5007,6 +5007,12 @@ inline void from_json(const BasicJsonType& j, ArithmeticType& val)
}
}
template<typename BasicJsonType, typename... Args, std::size_t... Idx>
std::tuple<Args...> from_json_tuple_impl_base(const BasicJsonType& j, index_sequence<Idx...> /*unused*/)
{
return std::make_tuple(j.at(Idx).template get<Args>()...);
}
template<typename BasicJsonType, typename... Args, std::size_t... Idx>
std::tuple<Args...> from_json_tuple_impl_base(BasicJsonType&& j, index_sequence<Idx...> /*unused*/)
{

View File

@ -1515,9 +1515,9 @@ NLOHMANN_JSON_SERIALIZE_ENUM(cards,
enum TaskState
{
TS_STOPPED,
TS_RUNNING,
TS_COMPLETED,
TS_STOPPED = 0,
TS_RUNNING = 1,
TS_COMPLETED = 2,
TS_INVALID = -1,
};