#if defined _STL70_
#include "_70_exception"
#elif defined _STL100_
#include "_100_exception"
#elif defined _STL110_
#if defined _STLFKG_
#include "_fkg_exception"
#else
#include "_110_exception"
#endif
#else

/***
*exception - Defines class exception and related functions
*
*	Copyright (c) Microsoft Corporation. All rights reserved.
*	Modified January 1996 by P.J. Plauger
*
*Purpose:
*       Defines class exception (and derived class bad_exception)
*       plus new and unexpected handler functions.
*
*       [Public]
*
****/

#ifndef _EXCEPTION_
#define _EXCEPTION_
#include <xstddef>
#include <eh.h>
#include <crtdefs.h>

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

class _CRTIMP exception
{
    typedef const char *__exString;
public:
    exception();
    exception(const __exString&);
    exception(const __exString&, int); // This is exported from 2003 msvcrt.dll but not XP msvcrt.dll.
    exception(const exception&);
    exception& operator= (const exception&);
#if defined (_X86_)
    friend void _SetExceptionString(exception* e, __exString String);
#endif /* _SYSCRT */    
    virtual ~exception();
    virtual __exString what() const;
private:
    __exString _m_what;
    int _m_doFree;
};
#if defined (_X86_)
__forceinline void _SetExceptionString(exception* e, const char* String) 
{
    if (!(e->_m_what) && !(e->_m_doFree))
    {
        e->_m_what = String;
    }
}
#endif /* _SYSCRT */    
_STD_BEGIN
using ::exception;

		// CLASS bad_exception
class _CRTIMP2 bad_exception : public exception {
public:
	bad_exception(const char *_S = "bad exception") _THROW0()
		: exception(_S) {}
	virtual ~bad_exception() _THROW0()
		{}
protected:
	virtual void _Doraise() const
		{_RAISE(*this); }
	};

_CRTIMP2 bool __cdecl uncaught_exception();

_STD_END

#ifdef __RTTI_OLDNAMES
typedef exception xmsg;        // A synonym for folks using older standard
#endif

#ifdef  _MSC_VER
#pragma pack(pop)
#endif  /* _MSC_VER */

#endif /* _EXCEPTION_ */

/*
 * 1994-2000, Microsoft Corporation. All rights reserved.
 * Modified January 1996 by P.J. Plauger
 * Consult your license regarding permissions and restrictions.
 */
// The file \sdpublic\sdk\inc\crt\exception was reviewed by LCA in June 2011 and per license is
//   acceptable for Microsoft use under Dealpoint ID 46582, 201971
/* 88bf0570-3001-4e78-a5f2-be5765546192 */ 

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