equal
deleted
inserted
replaced
|
1 |
|
2 /*! A template class */ |
|
3 template<class T,int i=100> class Test |
|
4 { |
|
5 public: |
|
6 Test(); |
|
7 Test(const Test &); |
|
8 }; |
|
9 |
|
10 /*! complete specialization */ |
|
11 template<> class Test<void *,200> |
|
12 { |
|
13 public: |
|
14 Test(); |
|
15 }; |
|
16 |
|
17 /*! A partial template specialization */ |
|
18 template<class T> class Test<T *> : public Test<void *,200> |
|
19 { |
|
20 public: |
|
21 Test(); |
|
22 }; |
|
23 |
|
24 /*! The constructor of the template class*/ |
|
25 template<class T,int i> Test<T,i>::Test() {} |
|
26 |
|
27 /*! The copy constructor */ |
|
28 template<class T,int i> Test<T,i>::Test(const Test &t) {} |
|
29 |
|
30 /*! The constructor of the partial specilization */ |
|
31 template<class T> Test<T *>::Test() {} |
|
32 |
|
33 /*! The constructor of the specilization */ |
|
34 template<> Test<void *,200>::Test() {} |
|
35 |