
Gordon Woodhull wrote:
Hello,
I am hoping to contribute an extension for intrusive to handle fusion containers, so that an intrusive hook can be an element in a fusion container and a fusion container can be an item in an intrusive container.
I have no idea about fusion, but you propose adding fusion_container_from_element to Intrusive, right? Correct me if I'm wrong, but I understand from the code that you first obtain the an iterator to an ElementKey (a type) of the map and then obtain a pointer to member to that element type inside the fusion container. Then you use offset_from_pointer_to_member function of Intrusive to obtain a pointer to the map. I was thinking if offset_from_pointer_to_member could be pushed to somewhere more Boost libraries can use (to boost/detail perhaps?) and avoid having fusion<->intrusive dependencies. Then we can add fusion_container_from_element to Fusion.
Thanks, Gordon
Regards, Ion