We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Following code couldn't be compiled because the from_json implementation uses the private member 'm_value'.
json Version: v3.7.0
#include <nlohmann/json.hpp> using json = nlohmann::json; int main() { json j = json::array({1, 0, 2}); j.get<std::valarray<int>>(); }
https://wandbox.org/permlink/ifYduziYXUtfgP4n
The text was updated successfully, but these errors were encountered:
Indeed. Changing
std::copy(j.m_value.array->begin(), j.m_value.array->end(), std::begin(l));
to
std::copy(j.begin(), j.end(), std::begin(l));
fixes the issue.
Sorry, something went wrong.
62dada0
This issue/PR will be part of the next release of the library. This template helps preparing the release notes.
std::valarray
nlohmann
No branches or pull requests
Following code couldn't be compiled because the from_json implementation uses the private member 'm_value'.
json Version: v3.7.0
https://wandbox.org/permlink/ifYduziYXUtfgP4n
The text was updated successfully, but these errors were encountered: