test-suite fix for c++17 and throw macro

This commit is contained in:
William S Fulton 2018-05-03 21:55:47 +01:00
commit 6cc6d21bd2

View file

@ -2,18 +2,6 @@
%warnfilter(SWIGWARN_TYPEMAP_DIRECTOROUT_PTR) return_const_char_star;
%{
// throw is deprecated in C++11 and invalid in C++17 and later
#if defined(__cplusplus) && __cplusplus >= 201103L
#define throw(TYPES...)
#else
#define throw(TYPES...) throw(TYPES)
#if defined(_MSC_VER)
#pragma warning(disable: 4290) // C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
#endif
#endif
%}
%{
#include <string>
@ -127,6 +115,18 @@ Foo *launder(Foo *f) {
%feature("director") Bar;
%feature("director") ReturnAllTypes;
%{
// throw is deprecated in C++11 and invalid in C++17 and later
#if defined(__cplusplus) && __cplusplus >= 201103L
#define throw(TYPES...)
#else
#define throw(TYPES...) throw(TYPES)
#if defined(_MSC_VER)
#pragma warning(disable: 4290) // C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
#endif
#endif
%}
%inline %{
struct Exception1
{