small suggestions for changes in std_ios.i

Hi

Would it be possible to add the following 2 typedefs to std_ios.i?

 typedef basic_ios<char> ios;
 typedef basic_ios<wchar_t> wios;

at present, it contains only

 %template(ios) basic_ios<char>;
 %template(wios) basic_ios<wchar_t>;

This means however that things like std::ios::openmode are currently not
recognised by SWIG. With the above typedefs, they are. Similar typedefs
should probably be added in std_iostream.i for ostream etc.

Also, while checking std_ios.i, it seems that the definition of basic_ios
has a copy-paste error in the private section (the constructor is still as
ios_base). To avoid confusion, I suggest to change that. Below is a diff
with the suggested changes.

Kris
This commit is contained in:
Kris Thielemans 2014-08-10 22:23:50 +01:00 committed by William S Fulton
commit f6b10f299f

View file

@ -242,17 +242,19 @@ namespace std {
// 27.4.5.1 basic_ios constructors
basic_ios();
private:
ios_base(const ios_base&);
basic_ios(const basic_ios&);
ios_base&
operator=(const ios_base&);
basic_ios&
operator=(const basic_ios&);
};
}
namespace std {
typedef basic_ios<char> ios;
%template(ios) basic_ios<char>;
#if defined(SWIG_WCHAR)
typedef basic_ios<wchar_t> wios;
%template(wios) basic_ios<wchar_t>;
#endif
}