// { dg-do compile } // { dg-additional-options "-std=c++14" } namespace std { typedef __SIZE_TYPE__ size_t; struct nothrow_t; } namespace vespamalloc { void fn1(void *); template class A { public: static unsigned long fillStack(unsigned long); }; template unsigned long A::fillStack(unsigned long p1) { void *retAddr[p1]; fn1(retAddr); return 0; } class B { protected: B(void *); }; template class D : B { public: D() : B(0) {} void alloc(int) { A::fillStack(StackTraceLen); } }; template class C { public: void *malloc(unsigned long); }; template void *C::malloc(unsigned long) { MemBlockPtrT mem; mem.alloc(0); return 0; } C, int> *_GmemP; } void *operator new(std::size_t, std::nothrow_t &) noexcept { return vespamalloc::_GmemP->malloc(0); } void *operator new[](std::size_t, std::nothrow_t &) noexcept { return vespamalloc::_GmemP->malloc(0); }