Skip to content

The project cannot be built in non-release mode with >=C++20 and GCC #855

@Tomaqa

Description

@Tomaqa

In your project, you use deprecated template-ids within constructors:

.../_deps/marabou-src/src/common/Vector.h:36:14:
warning: template-id not allowed for constructor in C++20 [-Wtemplate-id-cdtor]
   36 |     Vector<T>()

Also, your CMakeLists.txt defines for non-Clang non-release mode the following:

set(COMPILE_FLAGS  -Wall -Wextra -Werror -MMD ) #-Wno-deprecated

This causes the warnings to turn into errors.

Since I used your project as a submodule, I have not figured out how to force a different C++ standard just for your project.
What worked out for me was manually modifying the CMakeLists.txt.

I do not know what is the situation with Clang.

I would suggest either fixing these constructors, using -Wno-template-id-cdtor for GCC (which may not fix it for other compilers), or simply dropping -Werror.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions