-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Catch2 not fully compliant with c++17 #2021
Comments
Adding full build log: Check here, Catch2 seems not be completely compliant with c++17: resulting on the error posted by tdgeus. Please advise, is Catch2 intended to be strict compliant with c++17? |
Hi @tdegeus, could you change the issue name to something like: "Catch2 not fully compliant with c++17 causing tests to fail", I cannot since I'm not the author of the issue. Thanks, Best. |
Adding reference to conda-forge issue: |
The error seems to be related to the gcc version, In the ppc environment the gcc version is 8.4 In the linux version the gcc version is 7.5 According to https://en.cppreference.com/w/cpp/error/uncaught_exception, is deprecated in c++17, and gcc 8.4 already implemented the deprecation warning. Since testes are running with option |
Right, so the problem is that the detection of stdlib's support for I think I know why it misfires, and how to fix it, but it will have to wait until I have the time. |
@mjscosta Am I wrong or using deprecated things is allowed by the standard?? So even if you use a deprecated thing you are compliant. |
I'm not sure it is an issue regarding the standard or not, the issue I've got was on running the tests for Catch2, and the tests started to fail when using updated compiler (gcc 8.4), where the combination CATCH_ENABLE_WERROR:BOOL=ON (default as ON on the cmake), resulted on the tests failing. I've fixed the issue by setting the option to OFF for packaging purposes. So the issue maybe should be addressed regarding the tests, as they will start to fail when you update the compiler to one fully supporting c++17, at least for gcc 8.4 >= . |
Checking the builds, it seems that when executing the tests for COMPILER='g++-8' (https://travis-ci.org/github/catchorg/Catch2/jobs/726786262) |
@mjscosta https://travis-ci.org/github/catchorg/Catch2/jobs/726786262#L387 @giellamo It is indeed allowed, just not recommended. Ironically we (wg21) still haven't figured out whether deprecated means "will be removed at some point", or just "you really shouldn't use this". |
https://en.cppreference.com/w/cpp/language/attributes/deprecated and according to https://en.cppreference.com/w/cpp/error/uncaught_exception, it will be removed in c++20. @horenmar any idea why the error its occurring in the conda-forge packaging ? |
Should be fixed in master. |
The problem was that Catch2 did not reliably include `<exception>` before it checked for the feature test macro for `std::uncaught_exceptions`. To avoid overhead of including `<exception>` everywhere, the configuration check was split out into a separate header. Closes #2021
I'm trying to upgrade the conda-forge feedstock to the latest release (conda-forge/catch2-feedstock#33 ). However, I'm getting a build error:
The text was updated successfully, but these errors were encountered: