// xstddef standard header -*-c++-*-
// Copyright 2003-2020 IAR Systems AB. 
#ifndef _DLIB5_XSTDDEF_
#define _DLIB5_XSTDDEF_

#ifndef _SYSTEM_BUILD
  #pragma system_include
#endif

#include <xstddef0>
#include <cstddef>
#include <cstdlib>

namespace dlib5 {}
#define _DLIB5_BEGIN namespace dlib5 {
#define _DLIB5_END }
#define _STD std::
#define _DLIB5 dlib5::
#define _C_LIB_DECL extern "C" {
#define _END_C_LIB_DECL }
#define _CSTD

_DLIB5_BEGIN

#if _HAS_EXCEPTIONS
  // Throw(raise) an exception x with parameter y
  #define _THROW(x, y)   throw x(y)
#else // !_HAS_EXCEPTIONS
  #define _THROW(x, y)
#endif // _HAS_EXCEPTIONS

// MISCELLANEOUS MACROS
#define _DESTRUCTOR(ty, ptr)    (ptr)->~ty()
#define _MESG(str)      str
#define _PROTECTED      protected

#define _TDEF(x)        = x
#define _TDEF2(x, y)    = x, y

#ifndef _XSTD
  #define _X_STD_BEGIN  _DLIB5_BEGIN
  #define _X_STD_END    _DLIB5_END
  #define _XSTD _DLIB5 /* LEAVE SPACE */
#endif /* _XSTD */

// TYPE DEFINITIONS
enum _Uninitialized
{       // tag for suppressing initialization
  _Noinit
};

// FUNCTIONS
__ATTRIBUTES void _Nomemory();
_DLIB5_END
#endif /* _DLIB5_XSTDDEF_ */

/*
 * Copyright (c) 1992-2009 by P.J. Plauger.  ALL RIGHTS RESERVED.
 * Consult your license regarding permissions and restrictions.
V5.04:0576 */
