diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.other/friend10.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.other/friend10.C | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.other/friend10.C b/gcc/testsuite/g++.old-deja/g++.other/friend10.C new file mode 100644 index 000000000..935b2fe5b --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.other/friend10.C @@ -0,0 +1,30 @@ +// { dg-do assemble } +// Origin: Neil Booth, from PR #78 + +namespace MySpace + { + class Tag1 { }; + class Tag2 { }; + + template<class Tag> + class Object + { + public: + + friend void Forgotten(Object const & m) {} + }; + + typedef Object<Tag1> U1; + typedef Object<Tag2> U2; + + void foo() + { + Forgotten(U1()); + Forgotten(U2()); + } + + void bar() + { + Forgotten(U1()); + } + } |