Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
math/sound-of-sorting: fix build on -CURRENT
- Loading branch information
Showing
2 changed files
with
32 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- src/SortAlgo.h.orig 2017-12-23 08:39:32 UTC | ||
+++ src/SortAlgo.h | ||
@@ -164,22 +164,22 @@ class MyIterator : public std::iterator<std::random_ac | ||
reference operator[](const difference_type& n) const | ||
{ return m_array->get_mutable(m_pos + n); } | ||
|
||
- bool operator==(const MyIterator& r) | ||
+ bool operator==(const MyIterator& r) const | ||
{ return (m_array == r.m_array) && (m_pos == r.m_pos); } | ||
|
||
- bool operator!=(const MyIterator& r) | ||
+ bool operator!=(const MyIterator& r) const | ||
{ return (m_array != r.m_array) || (m_pos != r.m_pos); } | ||
|
||
- bool operator<(const MyIterator& r) | ||
+ bool operator<(const MyIterator& r) const | ||
{ return (m_array == r.m_array ? (m_pos < r.m_pos) : (m_array < r.m_array)); } | ||
|
||
- bool operator>(const MyIterator& r) | ||
+ bool operator>(const MyIterator& r) const | ||
{ return (m_array == r.m_array ? (m_pos > r.m_pos) : (m_array > r.m_array)); } | ||
|
||
- bool operator<=(const MyIterator& r) | ||
+ bool operator<=(const MyIterator& r) const | ||
{ return (m_array == r.m_array ? (m_pos <= r.m_pos) : (m_array <= r.m_array)); } | ||
|
||
- bool operator>=(const MyIterator& r) | ||
+ bool operator>=(const MyIterator& r) const | ||
{ return (m_array == r.m_array ? (m_pos >= r.m_pos) : (m_array >= r.m_array)); } | ||
|
||
difference_type operator+(const MyIterator& r2) const |