template < typename T > struct test { template < typename U > friend struct test<U>; }; int main() {}
This is absolutely correct code, no? I ask because MSVC ++ 2010 cannot compile it. However, this is not the first time that the templates have confused the MS compiler. As far as I can judge by books, sites, etc., It should work.
source share