diff --git a/include/wx/string.h b/include/wx/string.h index 1710a2e165..9f403dab07 100644 --- a/include/wx/string.h +++ b/include/wx/string.h @@ -3031,6 +3031,14 @@ WXDLLIMPEXP_BASE wxSTD ostream& operator<<(wxSTD ostream&, const wxCharBuffer&); WXDLLIMPEXP_BASE wxSTD ostream& operator<<(wxSTD ostream&, const wxWCharBuffer&); #endif +#if wxUSE_UNICODE + +WXDLLIMPEXP_BASE wxSTD wostream& operator<<(wxSTD wostream&, const wxString&); +WXDLLIMPEXP_BASE wxSTD wostream& operator<<(wxSTD wostream&, const wxCStrData&); +WXDLLIMPEXP_BASE wxSTD wostream& operator<<(wxSTD wostream&, const wxWCharBuffer&); + +#endif // wxUSE_UNICODE + #endif // wxUSE_STD_IOSTREAM // --------------------------------------------------------------------------- diff --git a/src/common/string.cpp b/src/common/string.cpp index 36efc0ce8e..a032dec82f 100644 --- a/src/common/string.cpp +++ b/src/common/string.cpp @@ -96,6 +96,25 @@ wxSTD ostream& operator<<(wxSTD ostream& os, const wxWCharBuffer& str) } #endif +#if wxUSE_UNICODE + +wxSTD wostream& operator<<(wxSTD wostream& wos, const wxString& str) +{ + return wos << str.wc_str(); +} + +wxSTD wostream& operator<<(wxSTD wostream& wos, const wxCStrData& str) +{ + return wos << str.AsWChar(); +} + +wxSTD wostream& operator<<(wxSTD wostream& wos, const wxWCharBuffer& str) +{ + return wos << str.data(); +} + +#endif // wxUSE_UNICODE + #endif // wxUSE_STD_IOSTREAM // ===========================================================================