Replies: 3 comments 1 reply
-
|
I'll take a look. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Can you raise this as an issue? |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
It was indeed a bug - fixed by issue #1297 . |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
I'm building a new
etl::intrusive_avl_treeclass (AVL tree), and it seems natural (and consistent with other "intrusive" collections) to use already existingetl::tree_linktype and its utilities (likeetl::link_rotateetc.).But I encountered problem with the "etl::link_rotate_left/right" functions - they update most of the links according to the desired rotation but for some reason one is missed - a child link at parent of
leafis not updated to point to theleaf. As a result, tree becomes broken after rotation (unless you write extra line to fix it afterwards).See:
etl/include/etl/intrusive_links.h
Line 1316 in c600605
@jwellbelove John, here is the question: Is there a reason or some design idea why grandparent's link is not updated?
BTW, the described above issue could be easy reproduced at the
test_tree_link_rotate_lefttest by adding one extra check line like:CHECK(r.etl_left == &a);after rotation.See:
etl/test/test_intrusive_links.cpp
Line 1629 in c600605
Thank You!
Beta Was this translation helpful? Give feedback.
All reactions