This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository efl.

View the commit online.

commit 4b2885d52a36ff22edc21a39b4af0bed2e4c54df
Author: Cedric BAIL <[email protected]>
AuthorDate: Sat Nov 14 11:57:52 2026 -0600

    eina_cxx: post-increment of an object iterator compiles
    
    The iterator over objects spelled post-increment as ++**this, which
    increments the object the iterator points to rather than the
    iterator: it did not compile as soon as anyone used it.
    
    Co-Authored-By: Claude Opus 5.5 <[email protected]>
---
 src/bindings/cxx/eina_cxx/eina_iterator.hh   | 2 +-
 src/tests/eina_cxx/eina_cxx_test_iterator.cc | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/bindings/cxx/eina_cxx/eina_iterator.hh b/src/bindings/cxx/eina_cxx/eina_iterator.hh
index 0e0cb8247a..a08adef1d2 100644
--- a/src/bindings/cxx/eina_cxx/eina_iterator.hh
+++ b/src/bindings/cxx/eina_cxx/eina_iterator.hh
@@ -301,7 +301,7 @@ public:
    */
   self_type& operator++(int)
   {
-    return ++**this;
+    return ++*this;
   }
 
   /**
diff --git a/src/tests/eina_cxx/eina_cxx_test_iterator.cc b/src/tests/eina_cxx/eina_cxx_test_iterator.cc
index 75365d71ce..0f3c54c78d 100644
--- a/src/tests/eina_cxx/eina_cxx_test_iterator.cc
+++ b/src/tests/eina_cxx/eina_cxx_test_iterator.cc
@@ -70,6 +70,11 @@ EFL_START_TEST(eina_cxx_eo_iterator_equal)
   nonamespace::Eina_Simple const result[] = {w1, w2, w3, w4};
 
   ck_assert(std::equal(iterator, last_iterator, result));
+
+  /* Post-increment moves on like pre-increment. */
+  efl::eina::iterator<nonamespace::Eina_Simple> it = list.ibegin();
+  it++;
+  ck_assert((*it)._eo_ptr() == w2._eo_ptr());
 }
 EFL_END_TEST
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to