First version committed to git
[zpugcc/jano.git] / toolchain / gcc / gcc / testsuite / g++.old-deja / g++.other / friend10.C
blob935b2fe5bdc0bd85b3acab9f9cd61a5509b0a3d5
1 // { dg-do assemble  }
2 // Origin: Neil Booth, from PR #78
4 namespace MySpace
5  {
6    class Tag1 { };
7    class Tag2 { };
9    template<class Tag>
10    class Object
11    {
12    public:
14      friend void Forgotten(Object const & m) {}
15    };
17    typedef Object<Tag1> U1;
18    typedef Object<Tag2> U2;
20    void foo()
21    {
22      Forgotten(U1());
23      Forgotten(U2());
24    }
26    void bar()
27    {
28      Forgotten(U1());
29    }
30  }