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
In c++ 17, std::string_view can be converted to std::string implicitly which leads to a problem that in c++17 mode , a json object cannot be assigned to a string due to ambiguous assigning conversion path ( json --> string and json --> string_view --> string).
In gcc 7.1 such code produces a compilation error width -std=c++1z.
Activity
nlohmann commentedon May 16, 2017
This seems related to #464.
nlohmann commentedon May 16, 2017
Checked with the latest GCC trunk version:
Krysme commentedon May 16, 2017
Thanks for the replying.This error message you posted is exactly what I had.
nlohmann commentedon May 20, 2017
This fixes the issue:
🐛 fix for #586
Krysme commentedon May 20, 2017
thanks for the fix.
btw is it better to change __cplusplus == 201703L to __cplusplus >= 201703L for future version of c++?
nlohmann commentedon May 20, 2017
Very good point. I shall fix this.
🐛 adjusting fix for future versions #586