comparison gcc/testsuite/g++.old-deja/g++.pt/friend23.C @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
comparison
equal deleted inserted replaced
111:04ced10e8804 131:84e7813d76e9
1 // { dg-do assemble } 1 // PR 59930 (part) templated class friend declarations cannot have
2 // default args.
2 3
3 template <class T = int> // { dg-message "note: original definition" } 4 template <class T>
4 struct S 5 struct S
5 { 6 {
6 template <class U = int> 7 template <class U = int> friend class R; // { dg-error "template friend" }
7 friend class S; // { dg-error "redefinition of default argument" } 8 template <class U = int> friend class S; // { dg-error "template friend" }
8 }; 9 };
9
10 template struct S<int>;