string iterator's operator- should return difference_type, not size_t or unsigned

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45347 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2007-04-09 08:18:33 +00:00
parent 1bb592b878
commit 89360a8c87
2 changed files with 8 additions and 5 deletions

View File

@@ -184,6 +184,7 @@ public:
typedef wxStringCharType value_type; \
typedef ref_type reference; \
typedef ptr_type pointer; \
typedef int difference_type; \
\
iterator_name(pointer ptr) : m_ptr(ptr) { } \
\
@@ -222,7 +223,7 @@ public:
iterator_name& operator-=(size_t n) \
{ m_ptr -= n; return *this; } \
\
size_t operator-(const iterator_name& i) const \
difference_type operator-(const iterator_name& i) const \
{ return m_ptr - i.m_ptr; } \
\
bool operator==(const iterator_name& i) const \
@@ -271,6 +272,8 @@ public:
const wxStringCharType*);
};
#undef WX_DEFINE_STRINGIMPL_ITERATOR
// constructors and destructor
// ctor for an empty string