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-common.c (get_priority): Add check for
[official-gcc.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.pt
/
ttp28.C
blob
91480ca59585855b94fc953d7665f72ffa6a40bd
1
// { dg-do run }
2
template<class T> class D
3
{
4
public:
5
int f();
6
};
7
8
template<class T> int D<T>::f()
9
{
10
return sizeof(T);
11
}
12
13
template<template<class> class D,class E> class C
14
{
15
D<E> d;
16
public:
17
int f() { return d.f(); }
18
};
19
20
template<template<class> class D,class E> int f(D<E> &d1)
21
{
22
d1.f();
23
C<D,E> d2;
24
d2.f();
25
return 0;
26
}
27
28
template<> int f<>(D<char> &d1)
29
{
30
d1.f();
31
return 0;
32
}
33
34
int main()
35
{
36
D<int> c1;
37
D<char> c2;
38
f(c1);
39
f(c2);
40
}