AFAIK, the friend declaration ought to be: template <typename T, typename U> template <int N> friendvoid B<T,U>::bar();
Only g++ accepts it without complaint.
clang++ warns that it does not support it, and turns off all access control for class 'C'
msc++ aborts after discovering an internal error in the compiler.