Merged
Conversation
… alecjacobson/warnings
jdumas
reviewed
Aug 26, 2023
include/igl/ASSERT.h
Outdated
| #include <cassert> | ||
| #ifndef ASSERT | ||
| #ifdef NDEBUG | ||
| #define ASSERT(x) do { (void)sizeof(x);} while (0) |
Collaborator
There was a problem hiding this comment.
I would suggest to prefix this with IGL_. You never know what other codebase might be defining their own ASSERT macro, in ways that could be incompatible with the libigl one... (e.g. imagine another lib defines their own ASSERT(x, msg) to take two mandatory arguments).
Contributor
|
This breaks the compilation on gcc-12.3 with c++20, the error is |
Contributor
Author
|
Happy to merge a pr fix
…On Wed, Dec 20, 2023, 5:13 AM William8915 ***@***.***> wrote:
This breaks the compilation on gcc-12.3 with c++20, the error is
WindingNumberTree.h:217:57: error: template-id not allowed for destructor
inline igl::WindingNumberTree<Point,DerivedV,DerivedF>::~WindingNumberTree<Point,DerivedV,DerivedF>()
—
Reply to this email directly, view it on GitHub
<#2254 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AARDJGPR7JY52FJQ7H3KSF3YKK23RAVCNFSM6AAAAAA372P75CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRUGIYDKMRZGE>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
|
William8915
added a commit
to William8915/libigl
that referenced
this pull request
Jan 15, 2024
This is a follow up fix of libigl#2254. After libigl#2254 gcc-12.3 reports the error "template-id not allowed for destructor".
This was referenced Jan 15, 2024
alecjacobson
pushed a commit
that referenced
this pull request
Feb 7, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1637 as much as I'm willing to.
This introduces the CMake flag
LIBIGL_WARNINGS_AS_ERRORSwhich doesn't really turn on all warnings but the ones I was willing to fix:I also wasn't willing to fix the warnings in the COMISO package and for some reason the compiler was finding warnings in the tetgen.h dependence even though that was supposed to be a system include and I thought they would be ignored.
The strong majority of the warnings were unused variables. If there were unused parameters I tried to remove those parameters (which will likely break some code; in a rather innocuous way).
Finally, there were some variables that show up just for assertions. It seems that C++ compilers don't have a good solution for this common problem. So I used the suggestion on SO.