https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62169
--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Jonathan Wakely from comment #6) > they have a pointer back to their patent container s/patent/parent/ As for solving the problem of switching containers, use a typedef for the container, or auto for the iterator. It doesn't need to be solved by the compiler.