I want to have a list. An entry in the list would store a value as well as an iterator to another entry in the list. How do I define this type? It\'d be something like this,
Use a boost::any, or equivalent, to store the iterator. As iterators tend to be small, the small object optimization will kick in, and the overhead will be low.