Fix new testcase to compile with C++98 compiler

This commit is contained in:
Olly Betts 2024-07-27 16:58:02 +12:00
parent 429a5b4e9a
commit a0a50812b5
1 changed files with 8 additions and 2 deletions

View File

@ -39,7 +39,13 @@ void *typedef_call1(AddByValueTypedef *& precallback, AddByValueTypedef * postca
void *typedef_call2(AddByPointerTypedef *& precallback, AddByPointerTypedef * postcallback) { return 0; }
void *typedef_call3(AddByReferenceTypedef *& precallback, AddByReferenceTypedef * postcallback) { return 0; }
#if __cplusplus >= 201103L || defined(SWIG)
# define NOEXCEPT noexcept
#else
# define NOEXCEPT
#endif
// Regression tests for #2087 (noexcept on a function pointer parameter type):
void f2087a(int (*g)() noexcept) { (void)g; }
void f2087b(int const (*g)() noexcept) { (void)g; }
void f2087a(int (*g)() NOEXCEPT) { (void)g; }
void f2087b(int const (*g)() NOEXCEPT) { (void)g; }
%}