Jean-Marc Lasgouttes wrote: >>>>>> "Georg" == Georg Baum >>>>>> <[EMAIL PROTECTED]> >>>>>> writes: > > Georg> Thanks, here is the patch. In the 1.4 version I was able to > Georg> make addToToc a virtual function of InsetBase, but in trunk > Georg> that is not possible anymore because it would create a circular > Georg> include dependency (insetbase.h -> toc.h -> pariterator.h -> > Georg> ... -> insetbase.h). > > Is this because you cannot forward-declare TocList?
Yes. The design of toc.h and TocBackend.h is not really clean. > This is > unfortunate and really makes the code uglier... It is already ugly, adding one more special test to 3 existing ones is only a little bit uglier :-) But I guess one could break up the circular dependency by using a scoped_ptr for Item::par_it_. Georg