-
-
Notifications
You must be signed in to change notification settings - Fork 510
New issue
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
Error on assigment to std::string lvalue reference #450
Comments
Ohh, Lovely... It is using gcc 7.1.0 with C++17 enabled. The problem seams to be that the standard implementation has some issues with string_view and basic_string overloads. I wonder if a workaround is even possible in usercode (without to much pain). |
Duplicate of #414 |
It turned out the usercode workaround is viable: For reading from lua I dont think the general use case would involve std::string_view due to lifetime issues. Big thanks for the folks at nlohmann/json/issues/464 for the macro
|
I forgot about this. But yes, I need to add that I'll integrate this into the code-base and it should make things clean everywhere. Sorry about the problems with C++17-and-beyond stuff: it's still a WIP! |
I don't think you have to apologize. It was a silent backward compatibility breaking change and I am still not convinced that the string_view works as intended in this corner case. Thank you for your hard work. |
So here's a juicy side note: nlohmann's code is correct, insofar as you actually include a |
Check the latest, it should be a little bit more okay now. |
With 48fc90b
Results in:
|
The problem is unrelated of any code, the sole inclusion produces the same error. |
Sorry about that: I'm still vetting C++17 support. It's fixed now. |
Fix confirmed. Thank you. |
The text was updated successfully, but these errors were encountered: