Skip to content

tests: fix compilation with c++14/17 #216

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

Merged
merged 1 commit into from
Dec 3, 2024
Merged

tests: fix compilation with c++14/17 #216

merged 1 commit into from
Dec 3, 2024

Conversation

iMichka
Copy link
Collaborator

@iMichka iMichka commented Dec 2, 2024

Fixes:
---------------------------- Captured stderr setup ----------------------------- /<>/.pybuild/cpython3_3.12_pygccxml/build/tests/data/core_types.hpp:57:38: error: ISO C++17 does not allow dynamic exception specifications [-Wdynamic-exception-spec]
57 | int some_function( double hi) const throw( exception ){
| ^~~~~~~~~~~~~~~~~~
/<>/.pybuild/cpython3_3.12_pygccxml/build/tests/data/core_types.hpp:57:38: note: use 'noexcept(false)' instead
57 | int some_function( double hi) const throw( exception ){
| ^~~~~~~~~~~~~~~~~~
| noexcept(false)
1 error generated.


No need to keep the throws / or to replace it with noexcept. We are not really testing this functionality here, so lets write code that is generic enough for all c++ versions

Fixes:
---------------------------- Captured stderr setup -----------------------------
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pygccxml/build/tests/data/core_types.hpp:57:38: error: ISO C++17 does not allow dynamic exception specifications [-Wdynamic-exception-spec]
   57 |         int some_function( double hi) const throw( exception ){
      |                                             ^~~~~~~~~~~~~~~~~~
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pygccxml/build/tests/data/core_types.hpp:57:38: note: use 'noexcept(false)' instead
   57 |         int some_function( double hi) const throw( exception ){
      |                                             ^~~~~~~~~~~~~~~~~~
      |                                             noexcept(false)
1 error generated.

-----

No need to keep the throws / or to replace it with noexcept.
We are not really testing this functionality here, so lets write code that is generic enough for all c++ versions
@iMichka iMichka mentioned this pull request Dec 2, 2024
@iMichka iMichka merged commit 7c72a13 into develop Dec 3, 2024
7 of 8 checks passed
@iMichka iMichka deleted the fix-core branch December 3, 2024 06:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant