#if defined _STL70_
#include "_70_new"
#elif defined _STL100_
#include "_100_new"
#elif defined _STL110_
#if defined _STLFKG_
#include "_fkg_new"
#else
#include "_110_new"
#endif
#else

// new standard header
#ifndef _NEW_
#define _NEW_
#include <exception>
#include <crtdefs.h>

#ifdef  _MSC_VER
#pragma pack(push,8)
#endif  /* _MSC_VER */

/* Define _CRTIMP3 */
/* Special case (this file only) for msvcp60.dll exports */
#ifdef	CRTDLL3
#define _CRTIMP3 __declspec(dllexport)
#else	/* CRTDLL3 */
#define _CRTIMP3
#endif	/* CRTDLL3 */

_STD_BEGIN

extern __declspec(selectany) const char * _bad_alloc_Message = "bad allocation";

		// CLASS bad_alloc
class _CRTIMP3 bad_alloc : public exception {
public:
	bad_alloc(const char *_S) _THROW0()
		: exception(_S) {}

	bad_alloc() _THROW0()
#if defined (_X86_)
		{
		_SetExceptionString(this, _bad_alloc_Message);
		}
#else /* _SYSCRT */
		: exception(_bad_alloc_Message, 1)
		{	// construct from message string with no memory allocation
		}
#endif /* _SYSCRT */

	virtual ~bad_alloc() _THROW0()
		{}

protected:
	virtual void _Doraise() const
		{_RAISE(*this); }
	};
		// SUPPORT TYPES
#ifndef __NOTHROW_T_DEFINED
struct nothrow_t {};
extern _CRTIMP2 const nothrow_t nothrow;
#endif  /* __NOTHROW_T_DEFINED */
_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);
#ifndef __NOTHROW_T_DEFINED
#define __NOTHROW_T_DEFINED
void *__cdecl operator new(size_t, const std::nothrow_t&)
	_THROW0();

#if     _MSC_VER >= 1200
#if     defined(_WIN64)
void __cdecl operator delete(void *,
	const std::nothrow_t&) _THROW0();
#else
inline void __cdecl operator delete(void * pv, const std::nothrow_t&)
    {::delete(pv);}
#endif
#endif
#endif  /* __NOTHROW_T_DEFINED */

#ifndef __PLACEMENT_NEW_INLINE
#define __PLACEMENT_NEW_INLINE
inline void *__CRTDECL operator new(size_t, void *_P)
	{return (_P); }
#if     _MSC_VER >= 1200
inline void __CRTDECL 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 /* _NEW_ */

/*
 * Copyright (c) 1994 by P.J. Plauger.  ALL RIGHTS RESERVED. 
 * Consult your license regarding permissions and restrictions.
 */
// The file \sdpublic\sdk\inc\crt\new was reviewed by LCA in June 2011 and per license is
//   acceptable for Microsoft use under Dealpoint ID 46582, 201971

#endif	// _STL70_ or _STL100_ or _STL110_
/* 88bf0570-3001-4e78-a5f2-be5765546192 */ 
