File: templ.cpp

package info (click to toggle)
doxygen 1.8.12-1
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 19,856 kB
  • ctags: 30,758
  • sloc: cpp: 237,683; lex: 35,587; xml: 8,286; python: 2,768; ansic: 629; tcl: 594; php: 446; perl: 370; makefile: 241; yacc: 235; objc: 14; sh: 11; java: 1
file content (35 lines) | stat: -rw-r--r-- 691 bytes parent folder | download | duplicates (13)
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

/*! A template class */
template<class T,int i=100> class Test
{
  public:
    Test();
    Test(const Test &);
};

/*! complete specialization */
template<> class Test<void *,200>
{
  public:
    Test();
};

/*! A partial template specialization */
template<class T> class Test<T *> : public Test<void *,200>
{
  public:
    Test();
};

/*! The constructor of the template class*/
template<class T,int i> Test<T,i>::Test() {}

/*! The copy constructor */
template<class T,int i> Test<T,i>::Test(const Test &t) {}

/*! The constructor of the partial specilization */
template<class T> Test<T *>::Test() {}

/*! The constructor of the specilization */
template<> Test<void *,200>::Test() {}