Add operator << (ostream&, const wxString&)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4253 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Sylvain Bougnoux 1999-10-29 15:11:25 +00:00
parent 191549ed17
commit 825ba8f0de
2 changed files with 8 additions and 1 deletions

View File

@ -1037,7 +1037,8 @@ inline wxString WXDLLEXPORT operator+(const wxCharBuffer& buf, const wxString& s
#include "wx/ioswrap.h" #include "wx/ioswrap.h"
WXDLLEXPORT istream& operator>>(istream& is, wxString& str); WXDLLEXPORT istream& operator>>(istream&, wxString&);
WXDLLEXPORT ostream& operator<<(ostream&, const wxString&);
#endif // wxSTD_STRING_COMPATIBILITY #endif // wxSTD_STRING_COMPATIBILITY

View File

@ -176,6 +176,12 @@ istream& operator>>(istream& is, wxString& WXUNUSED(str))
return is; return is;
} }
ostream& operator<<(ostream& os, const wxString& str)
{
os << str.c_str();
return os;
}
#endif //std::string compatibility #endif //std::string compatibility
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------