Blame examples/templ.cpp

Packit 1c1d7e
Packit 1c1d7e
/*! A template class */
Packit 1c1d7e
template<class T,int i=100> class Test
Packit 1c1d7e
{
Packit 1c1d7e
  public:
Packit 1c1d7e
    Test();
Packit 1c1d7e
    Test(const Test &);
Packit 1c1d7e
};
Packit 1c1d7e
Packit 1c1d7e
/*! complete specialization */
Packit 1c1d7e
template<> class Test<void *,200>
Packit 1c1d7e
{
Packit 1c1d7e
  public:
Packit 1c1d7e
    Test();
Packit 1c1d7e
};
Packit 1c1d7e
Packit 1c1d7e
/*! A partial template specialization */
Packit 1c1d7e
template<class T> class Test<T *> : public Test<void *,200>
Packit 1c1d7e
{
Packit 1c1d7e
  public:
Packit 1c1d7e
    Test();
Packit 1c1d7e
};
Packit 1c1d7e
Packit 1c1d7e
/*! The constructor of the template class*/
Packit 1c1d7e
template<class T,int i> Test<T,i>::Test() {}
Packit 1c1d7e
Packit 1c1d7e
/*! The copy constructor */
Packit 1c1d7e
template<class T,int i> Test<T,i>::Test(const Test &t) {}
Packit 1c1d7e
Packit 1c1d7e
/*! The constructor of the partial specilization */
Packit 1c1d7e
template<class T> Test<T *>::Test() {}
Packit 1c1d7e
Packit 1c1d7e
/*! The constructor of the specilization */
Packit 1c1d7e
template<> Test<void *,200>::Test() {}
Packit 1c1d7e