-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
ADL issue in input_adapter #2248
Comments
You could fix this by adding these functions in the same namespace as
but I think it would be better to not require this. @Francois-air does this function need the trailing return type, or can it be removed? The function only has a single return statement, so the |
Sure, I'm aware of that. The bug is that this should not be required of the user, as you say.
I would assume that it's because of C++11 compatibility... By "I don't know how to fix this" I meant: I don't know how to correctly specify the return type with C++11, so that it works in all cases... |
Probably something like this is the way to go: https://stackoverflow.com/a/35036343 |
Ugh, I was thinking that C++11 supported automatic return type deduction from a single |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
json::parse
does not work with containers which only providebegin()
andend()
member functions. This worked in 3.7.0.Example https://godbolt.org/z/NtXn4M:
gives a (long) compile error.
This is probably because of the unqualified
begin
andend
in the trailing return type here (https://github.com/nlohmann/json/blob/v3.8.0/single_include/nlohmann/json.hpp#L4796-L4805) withoutusing std::begin; using std::end;
:The old code had
std::begin
andstd::end
there, which is also wrong, for different reasons. Unfortunately, I don't know how to fix it...The text was updated successfully, but these errors were encountered: