blob: 72ca23c7017b1b76aa3f98cc0dc947513d2db83e [file] [log] [blame]
// PR c++/16617
class B
{
protected:
int i;
};
template <class T> void fr ();
class D2 : public B
{
friend void fr<int> ();
};
template<int B::*> struct X
{};
template <class T> void fr ()
{
X<&B::i> x1; // { dg-error "protected" }
X<&D2::i> x2; // { dg-error "protected" }
}
template void fr<char>();