X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/963ad140d0bc0a86df7cab700076a8d6192fc64c..fbf618dff87a9e4a88d5be458cecc50309b30af3:/include/wx/string.h?ds=sidebyside diff --git a/include/wx/string.h b/include/wx/string.h index d39b0c9188..844cfa9f81 100644 --- a/include/wx/string.h +++ b/include/wx/string.h @@ -187,6 +187,7 @@ inline int Stricmp(const char *psz1, const char *psz2) // we don't need an extra ctor from std::string when copy ctor already does // the work #undef wxUSE_STD_STRING + #define wxUSE_STD_STRING 0 #if (defined(__GNUG__) && (__GNUG__ < 3)) || \ (defined(_MSC_VER) && (_MSC_VER <= 1200)) @@ -954,6 +955,14 @@ public: // insert an unsigned long into string wxString& operator<<(unsigned long ul) { return (*this) << Format(_T("%lu"), ul); } +#if defined wxLongLong_t && !defined wxLongLongIsLong + // insert a long long if they exist and aren't longs + wxString& operator<<(wxLongLong_t ll) + { return (*this) << Format(_T("%") wxLongLongFmtSpec _T("d"), ll); } + // insert an unsigned long long + wxString& operator<<(wxULongLong_t ull) + { return (*this) << Format(_T("%") wxLongLongFmtSpec _T("u"), ull); } +#endif // insert a float into string wxString& operator<<(float f) { return (*this) << Format(_T("%f"), f); } @@ -1274,6 +1283,17 @@ public: { return (wxString&)wxStringBase::operator+=(ch); } }; +// IBM xlC compiler needs these operators to be declared in global scope, +// although this shouldn't be a problem for the other compilers we prefer to +// only do it for it in stable 2.6 branch +#ifdef __IBMCPP__ +wxString WXDLLIMPEXP_BASE operator+(const wxString& string1, const wxString& string2); +wxString WXDLLIMPEXP_BASE operator+(const wxString& string, wxChar ch); +wxString WXDLLIMPEXP_BASE operator+(wxChar ch, const wxString& string); +wxString WXDLLIMPEXP_BASE operator+(const wxString& string, const wxChar *psz); +wxString WXDLLIMPEXP_BASE operator+(const wxChar *psz, const wxString& string); +#endif // __IBMCPP__ + // define wxArrayString, for compatibility #if WXWIN_COMPATIBILITY_2_4 && !wxUSE_STL #include "wx/arrstr.h"