Blame examples/templ.cpp

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