bionic/libstdc++/include/new
Niko Catania 69b1a8ac50 AI 145716: am: CL 145714 Added cstring wrapper around string.h.
In new, include cstddef which declares std::size_t.
  Original author: niko

Automated import of CL 145716
2009-04-10 10:54:03 -07:00

29 lines
814 B
C++

/* -*- c++ -*- */
#ifndef __NEW__
#define __NEW__
#include <cstddef>
namespace std {
struct nothrow_t {};
extern const nothrow_t nothrow;
}
void* operator new(std::size_t);
void* operator new[](std::size_t);
void operator delete(void*);
void operator delete[](void*);
void* operator new(std::size_t, const std::nothrow_t&);
void* operator new[](std::size_t, const std::nothrow_t&);
void operator delete(void*, const std::nothrow_t&);
void operator delete[](void*, const std::nothrow_t&);
inline void* operator new(std::size_t, void* p) { return p; }
inline void* operator new[](std::size_t, void* p) { return p; }
// these next two are not really required, since exceptions are off
inline void operator delete(void*, void*) { }
inline void operator delete[](void*, void*) { }
#endif // __NEW__