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
/
ttp37.C
1
template<int T, class U = int> class D
2
{
3
public:
4
int f();
5
};
6
7
template<int T, class U> int D<T,U>::f()
8
{
9
return T+sizeof(U);
10
}
11
12
template<template<int> class D,class E> class C
13
{
14
D<1> d;
15
public:
16
int f() { return d.f(); }
17
};
18
19
template<template<int> class D, int T> int f(D<T> &d1)
20
{
21
d1.f();
22
return T;
23
}
24
25
int main()
26
{
27
D<1> c1;
28
f(c1);
29
}