1 // PR c++/15701
2 
3 template<template<int> class T> struct A : T<0>
4 {
5     void foo();
6     template<template<int> class U> friend void A<U>::foo();
7 };
8 
9 template<int> struct B {};
10 
11 A<B> a;
12