Skip to content

Commit 6c86036

Browse files
committed
tests: fix compilation with c++14/17
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
1 parent 5f6f235 commit 6c86036

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

tests/data/core_types.hpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,11 @@ typedef EFavoriteDrinks typedef_EFavoriteDrinks;
4848

4949
typedef int (*function_ptr)(int, double);
5050

51-
struct exception{};
52-
5351
struct members_pointers_t{
5452
int some_function( double hi, int i ){
5553
return 0;
5654
}
57-
int some_function( double hi) const throw( exception ){
55+
int some_function( double hi) const {
5856
return 0;
5957
};
6058
int m_some_const_member;

0 commit comments

Comments
 (0)