diff --git a/Lib/std_except.i b/Lib/std_except.i index a784e0206..642f5697b 100644 --- a/Lib/std_except.i +++ b/Lib/std_except.i @@ -4,7 +4,16 @@ %include #else + +/* avoid to include std/std_except.i unless we really need it */ +#if !defined(SWIG_STD_EXCEPTIONS_AS_CLASSES) +%{ +#include +%} +#else %include +#endif + // Typemaps used by the STL wrappers that throw exceptions. // These typemaps are used when methods are declared with an STL