repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
c++: robustify testcase [PR109752]
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
template
/
memfriend18.C
blob
ac21896e0a2a9bcd21509d6ebec8c5fceebde033
1
// PR c++/87571
2
3
template <class> struct A {
4
template <class> struct B {
5
template <class> friend class B;
6
protected:
7
int protected_member_;
8
public:
9
template <class T> int method(const B<T>& other) const {
10
return other.protected_member_;
11
}
12
};
13
};
14
15
int main() {
16
A<int>::B<int> a;
17
A<int>::B<char> b;
18
a.method(b);
19
}