implementing a recursive data structure

hey,

I need to implement the following data structure in c++

https://pastebin.com/M9yKhfGR (Java code)

I will point out what I'm finding hard to do in c++.

SplitFindminStructureGabow<T> is recursive

the top level is SplitFindminStructureGabow<T>
the next level... SplitFindminStructureGabow<Superelement<T>>
the next one ... SplitFindminStructureGabow<Superelement<Superelement<T>>>

etc

every struct except the top one needs to have a pointer to its predecessor

the following is used in Java:
@SuppressWarnings("unchecked")
private SplitFindminStructureGabow containingList;

that is, the type is not explicit.
the type of pointer to predecessor:
top level... no pointer, has to be nullptr
the next level SplitFindminStructureGabow<T>... etc.

basically, one Superelement<> needs to be stripped from the type.

any idea if this is possible using templates? thanks.
Topic archived. No new replies allowed.