To me it either looks as if someone over at tripwire was uncareful in patching the source as this bug is just some omissions of syntactical propriety or it hasn't been tested with gcc-4 yet. Nevertheless, from Bjarne himself: qq/ A friend class must be previously declared in an enclosing scope or defined in the non-class scope immediately enclosing the class that is declaring it a friend. Scopes outside the innermost enclosing namespace scope are not considered. / -- The C++ Programming Language, Special Edition. p 280 $ gcc --version gcc (GCC) 4.0.2 (Gentoo 4.0.2-r3, pie-8.7.8)
Created attachment 81225 [details, diff] a patch that fixes all broken forward friend declarations This patch should be pretty self explanatory. It patches the three class declarations who use friend classes without previously declaring them within the enclosing scope.
i manually patched, following the patch attached (please use -Nru swith for diff) and that works. please apply and close this gcc4 problem.
Thanks Justin, please provide a unified diff (produced using diff -u), and I'll get this fix into portage.
Created attachment 81707 [details, diff] same diff, but this time it works
Thanks Justin, I checked with a c++ guy here, and he confirms your observations, so I went ahead and added your patch. fixed in cvs.