Source code of Windows XP (NT5)
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
#pragma once
#ifndef _STLNEW_H_
#define _STLNEW_H_
//#include <exception>
#include <stlexcep.h>
#include "ncmem.h"
#ifdef _MSC_VER
#pragma pack(push,8)
#endif /* _MSC_VER */
_STD_BEGIN
// CLASS bad_alloc
class /*_CRTIMP*/ bad_alloc : public exception { public: bad_alloc(const char *_S = "bad allocation") _THROW0() : exception(_S) { } virtual ~bad_alloc() _THROW0() { } protected: virtual void _Doraise() const { _RAISE(*this); } };
// SUPPORT TYPES
struct nothrow_t { }; extern /*_CRTIMP*/ const nothrow_t nothrow;
_STD_END
/*
typedef void (__cdecl *new_handler)(); extern new_handler _New_hand;
// new AND delete DECLARATIONS
void __cdecl operator delete(void *) _THROW0(); void* __cdecl operator new(size_t) _THROW1(std::bad_alloc); void* __cdecl operator new(size_t, const std::nothrow_t&) _THROW0(); */
#ifndef __PLACEMENT_NEW_INLINE
#define __PLACEMENT_NEW_INLINE
inline void *__cdecl operator new(size_t, void *_P) { return (_P); } #if _MSC_VER >= 1200
inline void __cdecl operator delete(void *, void*) { return; } #endif
#endif
/*
#ifdef _CRTIMP
_CRTIMP #endif
new_handler __cdecl set_new_handler(new_handler) _THROW0(); */
#ifdef _MSC_VER
#pragma pack(pop)
#endif /* _MSC_VER */
#endif /* _STLNEW_H_ */
/*
* Copyright (c) 1994 by P.J. Plauger. ALL RIGHTS RESERVED. * Consult your license regarding permissions and restrictions. */
|