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

error: throw will always call terminate() [-Werror=terminate] #297

Closed
SnarkBoojum opened this issue May 29, 2020 · 3 comments
Closed

error: throw will always call terminate() [-Werror=terminate] #297

SnarkBoojum opened this issue May 29, 2020 · 3 comments
Assignees
Milestone

Comments

@SnarkBoojum
Copy link

I tried compiling the repo this morning (commit d4a18a1), on my Debian unstable box, and a few files don't compile because of the above error message, because (I quote another part of the message) in C++11 destructors default to noexcept.

The problem is that the assert macro framework raises exceptions, and is used in the dtor of quite a few classes : with C++11, such dtor hence break the compilation.

There are several ways out of this:

  1. never assert in a dtor! It's not logical... and that's why the default is noexcept ;
  2. declare each problematic dtor as possibly raising exceptions with something like ~WronderfulClass() noexcept(false){...}

I can provide an easy patch for the second way out.

@SnarkBoojum
Copy link
Author

anura_issue_297.txt

@DDR0
Copy link
Contributor

DDR0 commented Jun 18, 2020

Hm, I think this is one for @davewx7 or @sweetkristas. I've poked Dave on Discord about it.

@DDR0 DDR0 added this to the 1.4 milestone Jun 18, 2020
@DDR0
Copy link
Contributor

DDR0 commented Jun 18, 2020

Ah, looks like the patch is for master branch. We're using trunk, as noted at the bottom of README.md. Try that branch and it should be better. 👍

@DDR0 DDR0 closed this as completed Jun 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants