summaryrefslogtreecommitdiffstats
path: root/examples/templ.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>1999-12-15 19:25:10 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>1999-12-15 19:25:10 (GMT)
commit322885a8700a209812bf5a94205260c9bef6ac1f (patch)
treecc1cd70cf5761ddf72ff114c0b65576c3f4c1d2a /examples/templ.cpp
parent361bf7915be13b5c74688e33c427aea30641814c (diff)
downloadDoxygen-322885a8700a209812bf5a94205260c9bef6ac1f.zip
Doxygen-322885a8700a209812bf5a94205260c9bef6ac1f.tar.gz
Doxygen-322885a8700a209812bf5a94205260c9bef6ac1f.tar.bz2
initial version
Diffstat (limited to 'examples/templ.cpp')
-rw-r--r--examples/templ.cpp37
1 files changed, 37 insertions, 0 deletions
diff --git a/examples/templ.cpp b/examples/templ.cpp
new file mode 100644
index 0000000..c838c6e
--- /dev/null
+++ b/examples/templ.cpp
@@ -0,0 +1,37 @@
+/*! A template class */
+template<class T,int i=100> class Test
+{
+ public:
+ Test();
+ Test(const Test &);
+ friend void friendTempFunc(Test &, int=5);
+};
+
+/*! 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,i> &t) {}
+
+/*! A friend function of a template class */
+template<class T,int i> void friendTempFunc(Test<T,i> &t,int a) {}
+
+/*! The constructor of the specilization */
+template<> Test<void *,200>::Test() {}
+
+/*! The constructor of the partial specilization */
+template<class T> Test<T*>::Test() {}