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
* Makefile.in: Rebuilt.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.ns
/
template5.C
blob
9dc7a396a7efcab9bd6fa13209a058ca6092d464
1
//Check whether namespace-scoped template instantiations
2
//are mangled differently.
3
4
namespace X{
5
template<class T>
6
struct Y{
7
int f(T){
8
return 1;
9
}
10
template<class X>void g(){}
11
};
12
}
13
14
template<class T>
15
struct Y{
16
int f(T){
17
return 2;
18
}
19
};
20
21
int main()
22
{
23
X::Y<int> z;
24
if (z.f(4) != 1)
25
return 1;
26
z.template g<long>();
27
28
Y<int> z1;
29
if (z1.f(5) != 2)
30
return 1;
31
return 0;
32
}
33