You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using clang 9.0 which support C++17, but below codes can't pass compile when I use nlohmann::json:
std::optional<int> value;
auto json = nlohmann::json{{"opt", value}};
instead, I have to use below codes:
if (value) {
json = nlohmann::json{{"opt", *value}};
} else {
json = nlohmann::json{{"opt", nullptr}};
}
The text was updated successfully, but these errors were encountered:
I'm using clang 9.0 which support C++17, but below codes can't pass compile when I use nlohmann::json:
The text was updated successfully, but these errors were encountered: