2 // { dg-additional-options "-std=c++14" }
5 typedef __SIZE_TYPE__ size_t;
8 namespace vespamalloc {
10 template <typename> class A {
12 static unsigned long fillStack(unsigned long);
14 template <typename StackRep>
15 unsigned long A<StackRep>::fillStack(unsigned long p1) {
23 template <int StackTraceLen> class D : B {
26 void alloc(int) { A<int>::fillStack(StackTraceLen); }
28 template <typename, typename> class C {
30 void *malloc(unsigned long);
32 template <typename MemBlockPtrT, typename ThreadListT>
33 void *C<MemBlockPtrT, ThreadListT>::malloc(unsigned long) {
37 C<D<16>, int> *_GmemP;
39 void *operator new(std::size_t, std::nothrow_t &) noexcept {
40 return vespamalloc::_GmemP->malloc(0);
42 void *operator new[](std::size_t, std::nothrow_t &) noexcept {
43 return vespamalloc::_GmemP->malloc(0);