------- Comment #2 from redi at gcc dot gnu dot org 2009-10-16 11:42 ------- This looks very similar to bug 41038, but still fails with 4.4.2
N.B. you don't need the friend declaration at all, nested types can access all members of their enclosing class (this was changed by DR45) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41723