diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/template/friend22.C')
-rw-r--r-- | gcc/testsuite/g++.dg/template/friend22.C | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/template/friend22.C b/gcc/testsuite/g++.dg/template/friend22.C new file mode 100644 index 0000000..41a73bb --- /dev/null +++ b/gcc/testsuite/g++.dg/template/friend22.C @@ -0,0 +1,15 @@ +// { dg-do compile } + +// Origin: Benoit Hudson <bh@techhouse.brown.edu> + +// PR c++/641: Duplicate friend diagnostics + +template <class T> class iterator { }; +template <class T> class item { + friend class iterator<T>; + friend class iterator<const T>; +}; + +class A { }; + +item<const A> i; |