#include "wx/cpp.h"
#include "wx/chartype.h"
-#include "wx/wxcrt.h"
#include "wx/strconv.h"
#include "wx/buffer.h"
+#include "wx/unichar.h"
class WXDLLIMPEXP_BASE wxCStrData;
class WXDLLIMPEXP_BASE wxString;
#endif // wxUSE_UNICODE && !wxUSE_UTF8_LOCALE_ONLY
private:
+#ifdef __VISUALC__
+ // "struct 'ConvertedBuffer<T>' needs to have dll-interface to be used by
+ // clients of class 'wxString'" - this is private, we don't care
+ #pragma warning (disable:4251)
+#endif
wxCharBuffer m_char;
wxWCharBuffer m_wchar;
+#ifdef __VISUALC__
+ #pragma warning (default:4251)
+#endif
+
// NB: we can use a pointer here, because wxFormatString is only used
// as function argument, so it has shorter life than the string
// passed to the ctor
#endif // wxUSE_STD_STRING
+// versions for wxUniChar, wxUniCharRef:
+
+#if !wxUSE_UTF8_LOCALE_ONLY
+template<>
+struct wxArgNormalizerWchar<const wxUniChar&>
+ : public wxArgNormalizerWchar<wxChar/*FIXME-UTF8: should be wchar_t after ANSI removal*/>
+{
+ wxArgNormalizerWchar(const wxUniChar& s)
+ : wxArgNormalizerWchar<wxChar>((wxChar)s) {}
+};
+#endif // !wxUSE_UTF8_LOCALE_ONLY
+
+#if wxUSE_UNICODE_UTF8
+template<>
+struct wxArgNormalizerUtf8<const wxUniChar&>
+ : public wxArgNormalizerUtf8<char>
+{
+ wxArgNormalizerUtf8(const wxUniChar& s)
+ // FIXME-UTF8: this is lossy, we need to convert to string, but that
+ // requires format string update
+ : wxArgNormalizerUtf8<char>((const char)s) {}
+};
+#endif // wxUSE_UNICODE_UTF8
+
+WX_ARG_NORMALIZER_FORWARD(wxUniChar, const wxUniChar&);
+WX_ARG_NORMALIZER_FORWARD(const wxUniCharRef&, const wxUniChar&);
+WX_ARG_NORMALIZER_FORWARD(wxUniCharRef, const wxUniChar&);
+
+
#undef WX_ARG_NORMALIZER_FORWARD
#undef _WX_ARG_NORMALIZER_FORWARD_IMPL