only provide ptrdiff_t versions of verious operator+/- working with iterators instead of overloads for both int and size_t: this seems to be enough and the existing overloads were not enough for 64 bit builds where expressions such as iter+(ptr2-ptr1) didn't compile without extra casts
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51053 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -219,21 +219,13 @@ public:
|
||||
return tmp; \
|
||||
} \
|
||||
\
|
||||
iterator_name operator+(int n) const \
|
||||
iterator_name operator+(ptrdiff_t n) const \
|
||||
{ return iterator_name(m_ptr + n); } \
|
||||
iterator_name operator+(size_t n) const \
|
||||
{ return iterator_name(m_ptr + n); } \
|
||||
iterator_name operator-(int n) const \
|
||||
iterator_name operator-(ptrdiff_t n) const \
|
||||
{ return iterator_name(m_ptr - n); } \
|
||||
iterator_name operator-(size_t n) const \
|
||||
{ return iterator_name(m_ptr - n); } \
|
||||
iterator_name& operator+=(int n) \
|
||||
iterator_name& operator+=(ptrdiff_t n) \
|
||||
{ m_ptr += n; return *this; } \
|
||||
iterator_name& operator+=(size_t n) \
|
||||
{ m_ptr += n; return *this; } \
|
||||
iterator_name& operator-=(int n) \
|
||||
{ m_ptr -= n; return *this; } \
|
||||
iterator_name& operator-=(size_t n) \
|
||||
iterator_name& operator-=(ptrdiff_t n) \
|
||||
{ m_ptr -= n; return *this; } \
|
||||
\
|
||||
difference_type operator-(const iterator_name& i) const \
|
||||
|
Reference in New Issue
Block a user