OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
cp:
[pf3gnuchains/gcc-fork.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.pt
/
ttp27.C
1
template<class T> class D
2
{
3
public:
4
int f() const;
5
};
6
7
template<class T> int D<T>::f() const
8
{
9
return sizeof(T);
10
}
11
12
template<template<class> class D,class E> class C
13
{
14
D<E> d;
15
public:
16
int f() const { return d.f(); }
17
};
18
19
template<template<class> class D,class E> int f(const D<E> &d1)
20
{
21
d1.f();
22
C<D,E> d2;
23
d2.f();
24
return 0;
25
}
26
27
int main()
28
{
29
D<const int> c1;
30
D<char> c2;
31
const D<char> c3(c2);
32
f(c1);
33
f(c2);
34
f(c3);
35
}