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

With CATCH_CONFIG_DISABLE_EXCEPTIONS the single-header still references exception handling functionality #1462

Closed
nagisa opened this issue Nov 29, 2018 · 3 comments

Comments

@nagisa
Copy link

nagisa commented Nov 29, 2018

Description

When Catch2 (v2.5.0 tag) is used with CATCH_CONFIG_DISABLE_EXCEPTIONS define set, the single-file header will still refer to exception-handling specific functionality from the standard library.

Namely, in the ExceptionTranslatorRegistrar it directly references std::rethrow_exception and std::current_exception() which will make the library fail to compile when exceptions are disabled.

Steps to reproduce

  1. Use v.2.5.0 library with exceptions disabled and CATCH_CONFIG_DISABLE_EXCEPTIONS define set.

Extra information

  • Catch version: v2.5.0
  • Operating System: none (bare-metal)
  • Compiler+version: IAR 8.11.3
@horenmar
Copy link
Member

Interesting, all of our test builds on TravisCI passed (the ones with EXTRAS=1 build without exceptions and CATCH_CONFIG_DISABLE_EXCEPTIONS enabled, e.g. this one)

@horenmar
Copy link
Member

Can you try the dev-noexceptions-IAR branch? If you are using the single-include header, you will need to regenerate it first, using scripts/generateSingleHeader.

@horenmar
Copy link
Member

Ok, I am going to merge it to master and you can reopen the issue if it still comes up.

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

2 participants