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

GCC 7.x issue #926

Closed
sander-visser opened this issue Jan 19, 2018 · 4 comments
Closed

GCC 7.x issue #926

sander-visser opened this issue Jan 19, 2018 · 4 comments
Labels
solution: duplicate the issue is a duplicate; refer to the linked issue instead

Comments

@sander-visser
Copy link

Bug Report

  • What is the issue you have?
    Gcc 7.x complains about json.hpp row ~1581:

      // assertion to check that the iterator range is indeed contiguous,
      // see http://stackoverflow.com/a/35008842/266378 for more discussion
      assert(std::accumulate(
                 first, last, std::pair<bool, int>(true, 0),
                 [&first](std::pair<bool, int> res, decltype(*first) val)
      {
    

with error "lamda-expression in unevaluated context"

  • Please describe the steps to reproduce the issue. Can you provide a small but working code example?
    just include header in hello world application built using gcc 7.3

  • What is the expected behavior?

  • And what is the actual behavior instead?

  • Which compiler and operating system are you using? Is it a supported compiler?

  • Did you use a released version of the library or the version from the develop branch?
    looks to be the same on master

  • If you experience a compilation error: can you compile and run the unit tests?

Feature Request

  • Describe the feature in as much detail as possible.

  • Include sample usage where appropriate.

@nlohmann
Copy link
Owner

We could wrap this line in a #ifndef NDEBUG macro - @sander-visser could you try if this silences the warning?

@theodelrieu
Copy link
Contributor

Is it the same issue as #705?

@sander-visser
Copy link
Author

#ifndef wrap allows build to complete. AS i want runtime assertions and since im building using Yocto I guess the proper solution for me would be to cherry pick http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=1bd447bc606603a32a8ff75708bf377bcd82de2d ahead of it being included in yocto rocko. You may close this issue as duplicate/invalid.

@nlohmann nlohmann added the solution: duplicate the issue is a duplicate; refer to the linked issue instead label Jan 19, 2018
@nlohmann
Copy link
Owner

Duplicate, see #705.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
solution: duplicate the issue is a duplicate; refer to the linked issue instead
Projects
None yet
Development

No branches or pull requests

3 participants