allow to use iostream and sstream without wchar support, as pointed by Scott

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7137 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2005-04-02 18:52:10 +00:00
commit 5702970de9
7 changed files with 67 additions and 19 deletions

View file

@ -1,5 +1,7 @@
%include <std_common.i>
#if defined(SWIG_WCHAR)
%include <wchar.i>
#endif
namespace std
{
@ -68,6 +70,7 @@ namespace std
};
#if defined(SWIG_WCHAR)
template<>
struct char_traits<wchar_t>
{
@ -119,14 +122,19 @@ namespace std
static int_type
not_eof(const int_type& __c);
};
#endif
}
namespace std {
#ifndef SWIG_STL_WRAP_TRAITS
%template() char_traits<char>;
#if defined(SWIG_WCHAR)
%template() char_traits<wchar_t>;
#endif
#else
%template(char_traits_c) char_traits<char>;
#if defined(SWIG_WCHAR)
%template(char_traits_w) char_traits<wchar_t>;
#endif
#endif
}