-
Notifications
You must be signed in to change notification settings - Fork 2k
Expand file tree
/
Copy pathtest.cpp
More file actions
55 lines (43 loc) · 783 Bytes
/
test.cpp
File metadata and controls
55 lines (43 loc) · 783 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
class C {
public:
template <typename T>
void f_template_C(T t) { }
template <typename T>
void f_template_C_D(T t) { }
void f_C(void) { }
void f_C_D(void) { }
};
class D : public C {
public:
template <typename T>
void f_template_C_D(T t) { }
template <typename T>
void f_template_D(T t) { }
void f_C_D(void) { }
void f_D(void) { }
};
template <typename T>
class E {
public:
void f_E(void) {}
void f_E_arg(E e) {}
};
void g(void) {
int vi;
double vd;
C c;
c.f_template_C(vi);
c.f_template_C_D(vi);
c.f_C();
c.f_C_D();
D d;
d.f_template_C(vd);
d.f_template_C_D(vd);
d.f_template_D(vd);
d.f_C();
d.f_C_D();
d.f_D();
E<int> e;
e.f_E();
e.f_E_arg(e);
}