Retro68/binutils/ld/testsuite/ld-elf/del.cc

30 lines
393 B
C++
Raw Normal View History

2012-03-26 19:18:29 +00:00
#include <new>
extern "C" void free (void *);
void
operator delete (void *ptr, const std::nothrow_t&) throw ()
{
if (ptr)
free (ptr);
}
void
operator delete (void *ptr) throw ()
{
if (ptr)
free (ptr);
}
void
operator delete[] (void *ptr) throw ()
{
::operator delete (ptr);
}
void
operator delete[] (void *ptr, const std::nothrow_t&) throw ()
{
::operator delete (ptr);
}