Add missing comparison operator declarations in wxString::iterator.
Fix compilation in !wxUSE_UNICODE_UTF8 case after r65857. Modify the second declaration of wxString::iterator class which was not updated by the previous commit in the same way, i.e. add declaration of comparison operators taking const_iterator to iterator class. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65859 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
		@@ -1098,6 +1098,15 @@ public:
 | 
				
			|||||||
      iterator operator-(ptrdiff_t n) const
 | 
					      iterator operator-(ptrdiff_t n) const
 | 
				
			||||||
        { return iterator(wxStringOperations::AddToIter(m_cur, -n)); }
 | 
					        { return iterator(wxStringOperations::AddToIter(m_cur, -n)); }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      // As in UTF-8 case above, define comparison operators taking
 | 
				
			||||||
 | 
					      // const_iterator too.
 | 
				
			||||||
 | 
					      bool operator==(const const_iterator& i) const;
 | 
				
			||||||
 | 
					      bool operator!=(const const_iterator& i) const;
 | 
				
			||||||
 | 
					      bool operator<(const const_iterator& i) const;
 | 
				
			||||||
 | 
					      bool operator>(const const_iterator& i) const;
 | 
				
			||||||
 | 
					      bool operator<=(const const_iterator& i) const;
 | 
				
			||||||
 | 
					      bool operator>=(const const_iterator& i) const;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  private:
 | 
					  private:
 | 
				
			||||||
      // for internal wxString use only:
 | 
					      // for internal wxString use only:
 | 
				
			||||||
      iterator(underlying_iterator ptr) : m_cur(ptr) {}
 | 
					      iterator(underlying_iterator ptr) : m_cur(ptr) {}
 | 
				
			||||||
@@ -1125,6 +1134,11 @@ public:
 | 
				
			|||||||
      const_iterator operator-(ptrdiff_t n) const
 | 
					      const_iterator operator-(ptrdiff_t n) const
 | 
				
			||||||
        { return const_iterator(wxStringOperations::AddToIter(m_cur, -n)); }
 | 
					        { return const_iterator(wxStringOperations::AddToIter(m_cur, -n)); }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      // As in UTF-8 case above, we don't need comparison operators taking
 | 
				
			||||||
 | 
					      // iterator because we have an implicit conversion from iterator to
 | 
				
			||||||
 | 
					      // const_iterator so the operators declared by WX_STR_ITERATOR_IMPL will
 | 
				
			||||||
 | 
					      // be used.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  private:
 | 
					  private:
 | 
				
			||||||
      // for internal wxString use only:
 | 
					      // for internal wxString use only:
 | 
				
			||||||
      const_iterator(underlying_iterator ptr) : m_cur(ptr) {}
 | 
					      const_iterator(underlying_iterator ptr) : m_cur(ptr) {}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user