Skip to content
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

Lambda in unevaluated context #1225

Closed
vimpunk opened this issue Sep 4, 2018 · 3 comments
Closed

Lambda in unevaluated context #1225

vimpunk opened this issue Sep 4, 2018 · 3 comments
Assignees
Milestone

Comments

@vimpunk
Copy link
Contributor

vimpunk commented Sep 4, 2018

I've seen #705 but it doesn't appear to be fixed. I'm unfortunately not on bleeding edge (xtensa gcc 5.2.0) so can't use newer gcc versions where this has been fixed. Can we fix this? I can make a PR.

~/code/work/esp32-core/main/json/single_include/nlohmann/json.hpp: In constructor 'nlohmann::detail::input_adapter::input_adapter(IteratorType, IteratorType)':
~/code/work/esp32-core/main/json/single_include/nlohmann/json.hpp:2165:20: error: lambda-expression in unevaluated context
                    [&first](std::pair<bool, int> res, decltype(*first) val)
@nlohmann
Copy link
Owner

nlohmann commented Sep 6, 2018

Yes, PRs welcome! Could you then please make sure the lambda is only created when #ifdef DEBUG so we have the same production code as with the lambda in the assertion?

@vimpunk
Copy link
Contributor Author

vimpunk commented Sep 8, 2018

Ok, great! And sure, that makes sense. I'll be able to work on it Monday and hopefully land it the same day.

@vimpunk
Copy link
Contributor Author

vimpunk commented Sep 10, 2018

Made the changes in #1230!

@nlohmann nlohmann self-assigned this Sep 10, 2018
@nlohmann nlohmann added this to the Release 3.2.1 milestone Sep 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants