mods for VC++
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8420 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
daa1c2f25f
commit
8ba34a8f52
3 changed files with 22 additions and 0 deletions
|
|
@ -2,6 +2,12 @@
|
|||
|
||||
%include <std_except.i>
|
||||
|
||||
%{
|
||||
#if defined(_MSC_VER)
|
||||
#pragma warning(disable: 4290) // C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
|
||||
#endif
|
||||
%}
|
||||
|
||||
|
||||
%inline %{
|
||||
struct E1 : public std::exception
|
||||
|
|
|
|||
|
|
@ -35,6 +35,10 @@ std::string& test_reference_out() {
|
|||
return x;
|
||||
}
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma warning(disable: 4290) // C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
|
||||
#endif
|
||||
|
||||
void test_throw() throw(std::string){
|
||||
static std::string x = "test_throw message";
|
||||
throw x;
|
||||
|
|
@ -53,6 +57,10 @@ void test_const_pointer_throw() throw(const std::string *) {
|
|||
throw new std::string("foo");
|
||||
}
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma warning(default: 4290) // C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
|
||||
#endif
|
||||
|
||||
%}
|
||||
|
||||
%apply const std::string& { std::string *GlobalString2,
|
||||
|
|
|
|||
|
|
@ -65,12 +65,20 @@ std::string& test_reference_out() {
|
|||
return x;
|
||||
}
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma warning(disable: 4290) // C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
|
||||
#endif
|
||||
|
||||
void test_throw() throw(std::string){
|
||||
static std::string x = "x";
|
||||
|
||||
throw x;
|
||||
}
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma warning(default: 4290) // C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
|
||||
#endif
|
||||
|
||||
|
||||
std::basic_string<char> test_value_basic1(std::basic_string<char> x) {
|
||||
return x;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue