Skip to content

Compilation issue with gcc 7.2 #742

Description

@cdehnert

When compiling with the newly released gcc 7.2, I get the following compilation error:

/tmp/makepkg/stormchecker-git/src/stormchecker-git/resources/3rdparty/modernjson/src/json.hpp: In function ‘bool nlohmann::operator<(nlohmann::basic_json<ObjectType, ArrayType, StringType, Boole
anType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType>::const_reference, nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUns
ignedType, NumberFloatType, AllocatorType>::const_reference)’:
/tmp/makepkg/stormchecker-git/src/stormchecker-git/resources/3rdparty/modernjson/src/json.hpp:5653:66: error: wrong number of template arguments (1, should be 2)
                        return *lhs.m_value.array < *rhs.m_value.array;
                                                                 ^~~~~
In file included from /usr/include/c++/7.2.0/tuple:39:0,
                from /usr/include/c++/7.2.0/bits/unique_ptr.h:37,
                from /usr/include/c++/7.2.0/memory:80,
                from /tmp/makepkg/stormchecker-git/src/stormchecker-git/src/storm-pars/api/region.h:6,
                from /tmp/makepkg/stormchecker-git/src/stormchecker-git/src/storm-pars/api/storm-pars.h:3,
                from /tmp/makepkg/stormchecker-git/src/stormchecker-git/src/storm-pars-cli/storm-pars.cpp:2:
/usr/include/c++/7.2.0/array:94:12: note: provided for ‘template<class _Tp, long unsigned int _Nm> struct std::array’
    struct array
           ^~~~~
make[3]: *** [src/storm-pars-cli/CMakeFiles/storm-pars-cli.dir/build.make:63: src/storm-pars-cli/CMakeFiles/storm-pars-cli.dir/storm-pars.cpp.o] Error 1
make[2]: *** [CMakeFiles/Makefile2:2143: src/storm-pars-cli/CMakeFiles/storm-pars-cli.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:1408: src/CMakeFiles/binaries.dir/rule] Error 2
make: *** [Makefile:704: binaries] Error 2

For gcc < 7.1.0 everything went smoothly until now. To be honest, I cannot really wrap my head around the compilation error, as a) m_value.array appears to be of type std::vector<>* and not std::array<>* and b) no template arguments are given in the line that is being pointed to.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    solution: duplicatethe issue is a duplicate; refer to the linked issue instead

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions