| 1 |
// { dg-do run } |
| 2 |
|
| 3 |
template<int patch_dim, int patch_space_dim> |
| 4 |
class DataOutInterface |
| 5 |
{ |
| 6 |
public: |
| 7 |
virtual ~DataOutInterface() {} |
| 8 |
}; |
| 9 |
|
| 10 |
template <int dof_handler_dim, int patch_dim, int patch_space_dim=patch_dim> |
| 11 |
class DataOut_DoFData : public DataOutInterface<patch_dim,patch_space_dim> |
| 12 |
{ |
| 13 |
public: |
| 14 |
virtual ~DataOut_DoFData() {} |
| 15 |
|
| 16 |
class DataEntryBase { |
| 17 |
public: |
| 18 |
virtual ~DataEntryBase () {} |
| 19 |
}; |
| 20 |
|
| 21 |
template <typename T> |
| 22 |
class DataEntry : public DataEntryBase |
| 23 |
{ |
| 24 |
public: |
| 25 |
virtual ~DataEntry() {} |
| 26 |
}; |
| 27 |
}; |
| 28 |
|
| 29 |
template <typename T> void Destroy(T * p) __attribute__((noinline)); |
| 30 |
template <typename T> void Destroy(T * p) |
| 31 |
{ |
| 32 |
delete p; |
| 33 |
} |
| 34 |
|
| 35 |
int main() |
| 36 |
{ |
| 37 |
DataOut_DoFData<3,3>::DataEntryBase * p = new DataOut_DoFData<3,3>::DataEntry<int>(); |
| 38 |
Destroy(p); |
| 39 |
} |