Skip to content

Commit e386a62

Browse files
Merge pull request #35 from zxey/patch-1
Fix pre-increment and post-increment operators on iterator
2 parents 6188609 + b55c5f9 commit e386a62

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

CMakeRC.cmake

+5-5
Original file line numberDiff line numberDiff line change
@@ -247,15 +247,15 @@ public:
247247
return !(*this == rhs);
248248
}
249249

250-
iterator operator++() noexcept {
251-
auto cp = *this;
250+
iterator& operator++() noexcept {
252251
++_base_iter;
253-
return cp;
252+
return *this;
254253
}
255254

256-
iterator& operator++(int) noexcept {
255+
iterator operator++(int) noexcept {
256+
auto cp = *this;
257257
++_base_iter;
258-
return *this;
258+
return cp;
259259
}
260260
};
261261

0 commit comments

Comments
 (0)