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
/
lookup15.C
blob
c7f3ba01576f8aa662a5403c6a81e5afb910235b
1
// PR c++/94799 - member template function lookup fails.
2
3
template<typename>
4
struct M { void fn() { } };
5
6
M<int>* bar (int);
7
M<int> bar2 (int);
8
9
template<typename T>
10
struct X : M<T> {
11
void xfn ()
12
{
13
this->template M<T>::fn ();
14
bar((T)1)->template M<T>::fn ();
15
bar2((T)1).template M<T>::fn ();
16
}
17
};
18
19
int
20
main ()
21
{
22
X<int> x;
23
x.xfn();
24
}