mirror of
https://github.com/nlohmann/json.git
synced 2025-06-15 17:20:37 +08:00
parent
7bcaba0ca9
commit
62dada05ca
@ -154,7 +154,7 @@ void from_json(const BasicJsonType& j, std::valarray<T>& l)
|
|||||||
JSON_THROW(type_error::create(302, "type must be array, but is " + std::string(j.type_name())));
|
JSON_THROW(type_error::create(302, "type must be array, but is " + std::string(j.type_name())));
|
||||||
}
|
}
|
||||||
l.resize(j.size());
|
l.resize(j.size());
|
||||||
std::copy(j.m_value.array->begin(), j.m_value.array->end(), std::begin(l));
|
std::copy(j.begin(), j.end(), std::begin(l));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename BasicJsonType, typename T, std::size_t N>
|
template <typename BasicJsonType, typename T, std::size_t N>
|
||||||
|
@ -3025,7 +3025,7 @@ void from_json(const BasicJsonType& j, std::valarray<T>& l)
|
|||||||
JSON_THROW(type_error::create(302, "type must be array, but is " + std::string(j.type_name())));
|
JSON_THROW(type_error::create(302, "type must be array, but is " + std::string(j.type_name())));
|
||||||
}
|
}
|
||||||
l.resize(j.size());
|
l.resize(j.size());
|
||||||
std::copy(j.m_value.array->begin(), j.m_value.array->end(), std::begin(l));
|
std::copy(j.begin(), j.end(), std::begin(l));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename BasicJsonType, typename T, std::size_t N>
|
template <typename BasicJsonType, typename T, std::size_t N>
|
||||||
|
Loading…
Reference in New Issue
Block a user