]> git.ipfire.org Git - thirdparty/gcc.git/blob - libvtv/testsuite/dataentry.cc
fa027d5bc71bc4e25e0ca1cb861d6653cc5b65ab
[thirdparty/gcc.git] / libvtv / testsuite / dataentry.cc
1 template<int patch_dim, int patch_space_dim>
2 class DataOutInterface
3 {
4 public:
5 virtual ~DataOutInterface() {}
6 };
7
8 template <int dof_handler_dim, int patch_dim, int patch_space_dim=patch_dim>
9 class DataOut_DoFData : public DataOutInterface<patch_dim,patch_space_dim>
10 {
11 public:
12 virtual ~DataOut_DoFData() {}
13
14 class DataEntryBase {
15 public:
16 virtual ~DataEntryBase () {}
17 };
18
19 template <typename T>
20 class DataEntry : public DataEntryBase
21 {
22 public:
23 virtual ~DataEntry() {}
24 };
25 };
26
27 template <typename T> void Destroy(T * p) __attribute__((noinline));
28 template <typename T> void Destroy(T * p)
29 {
30 delete p;
31 }
32
33 int main()
34 {
35 DataOut_DoFData<3,3>::DataEntryBase * p = new DataOut_DoFData<3,3>::DataEntry<int>();
36 Destroy(p);
37 }