Commit 68d3564a by Jason Merrill

re PR c++/32519 (g++ allows access to protected template member functions of base class)

        PR c++/32519
        * g++.dg/template/pr32519.C: New test.

From-SVN: r142264
parent b5a029b1
// PR 32519
// { dg-do compile }
struct B
{
protected:
template <class T> void f (); // { dg-error "protected" }
};
struct D : public B
{
void g (B* b)
{
b->f<int> (); // { dg-error "context" }
}
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment