diff options
Diffstat (limited to 'libvtv/testsuite/template-list2.cc')
-rw-r--r-- | libvtv/testsuite/template-list2.cc | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/libvtv/testsuite/template-list2.cc b/libvtv/testsuite/template-list2.cc new file mode 100644 index 00000000000..f8ec739b6d5 --- /dev/null +++ b/libvtv/testsuite/template-list2.cc @@ -0,0 +1,44 @@ +#include <assert.h> + +extern "C" int printf(const char *, ...); + +class Subscriptor +{ + public: + + Subscriptor() + { counter = 1;} + + virtual ~Subscriptor() + { + counter--; + assert(counter == 0); + } + + private: + static int counter; +}; + +int Subscriptor::counter; + +template <typename number> +class Polynomial : public Subscriptor +{ +}; + +class LagrangeEquidistant: public Polynomial<double> +{ +}; + +template<typename _Tp> +inline void +_MyDestroy(_Tp* __pointer) + { __pointer->~_Tp(); } + +int main() +{ + LagrangeEquidistant * s1 = new LagrangeEquidistant; + _MyDestroy(s1); + + return 0; +} |