
Out of 3 items, I can see the leaf nodes (left_ and right_) correctly, but the head node is displayed incorrectly. When I add some more items, I still see just 2 or 3 items and the rest is garbage. Perhaps there is something about _compressed_base which needs special treatment?
Yes, this is related to a special memory-saving technique described at:
http://boost.org/libs/multi_index/doc/tutorial/indices.html#ordered_node_com...
I cannot check, but I think the correct expression for head should be:
*((ordered_index_node_impl*)( ((ordered_index_node_impl*)(ordered_index_node_trampoline<$T1>*)($c.member) )->parentcolor_&~1u))
Does this work? If so, we can move on to the rest of node types :)
Yes!! Wow, that was way simpler than I expected. The resulting
visualizer works perfectly with the support code that I posted earlier:
boost::multi_index::detail::header_holder
*)(boost::multi_index::detail::ordered_index_node<$T1>*)(boost::multi_index::detail::ordered_index_node_trampoline<$T1>*)(&$e) ) ) }
(The visualizer needs all the boost::multi_index::detail:: specification
stuff...)
I tried hashed_unique right away, and I have another issue:
boost::multi_index::detail::header_holder
*)(hashed_index_node<$T1>*)(hashed_index_node_trampoline<$T1>*)(&$e) ) ) }
It seems that accessing node_count using the same technique as with ordered_unique does not work - I'm off by 4 bytes (see the (((char*)&$c)+4) expression). Clicking through the head node's next_ members reveals that I'm cycling between just 2 nodes (there should be 5 of them), and the data is garbage. So perhaps I'm missing some additional cast somewhere, but I don't see where. There is one more issue with hashed indices: the type names tend to get so long, that when I use more than one index with hashed_unique, the name gets cut in the half (some fixed string length...) and fails to match the pattern (there're loads of boost::mpl::na or something like this). If there's no compiler flag to set, this will probably be a limitation. Cheers, Filip