Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
_new.h
Go to the documentation of this file.
1// -*- C++ -*-
2
33#ifndef _RWSTD_RW_NEW_H_INCLUDED
34#define _RWSTD_RW_NEW_H_INCLUDED
35
36#ifndef _RWSTD_RW_DEFS_H_INCLUDED
37# include <rw/_defs.h>
38#endif // _RWSTD_RW_DEFS_H_INCLUDED
39
40
41#if defined (__SUNPRO_CC)
42# include <new>
43#else // if !defined (__SUNPRO_CC)
44
45void* operator new (_RWSTD_SIZE_T, void*) _NEW_THROWS (());
46
47# ifdef _RWSTD_NO_OPERATOR_NEW_PLACEMENT
48
49# if !defined (_MSC_VER) || !defined (__PLACEMENT_NEW_INLINE)
50
51 // remember to disable definitions of placement new and
52 // placement delete in MSVC's <new.h> later in this file
53# define _RWSTD_DEFINE_PLACEMENT_NEW_INLINE
54
55// 18.4.1.3, p2 - not replaceable, no-op
56inline void*
57operator new (_RWSTD_SIZE_T, void *__ptr) _NEW_THROWS (())
58{
59 return __ptr;
60}
61
62# endif // !MSVC || !__PLACEMENT_NEW_INLINE
63# endif // _RWSTD_NO_OPERATOR_NEW_PLACEMENT
64
65
66# ifndef _RWSTD_NO_PLACEMENT_DELETE
67
68# if !defined (_MSC_VER) || !defined (__PLACEMENT_NEW_INLINE)
69
70void operator delete (void*, void*) _NEW_THROWS (());
71
72# ifdef _RWSTD_NO_OPERATOR_DELETE_PLACEMENT
73
74 // remember to disable definitions of placement new and
75 // placement delete in MSVC's <new.h> later in this file
76# define _RWSTD_DEFINE_PLACEMENT_NEW_INLINE
77
78// not replaceable, no-op
79inline void
80operator delete (void*, void*) _NEW_THROWS (())
81{
82 // no-op
83}
84
85# endif // _RWSTD_NO_OPERATOR_DELETE_PLACEMENT
86# endif // !MSVC || !__PLACEMENT_NEW_INLINE
87# endif // _RWSTD_NO_PLACEMENT_DELETE
88
89# ifdef _RWSTD_DEFINE_PLACEMENT_NEW_INLINE
90# define __PLACEMENT_NEW_INLINE
91# undef _RWSTD_DEFINE_PLACEMENT_NEW_INLINE
92# endif // _RWSTD_DEFINE_PLACEMENT_NEW_INLINE
93
94#endif // __SUNPRO_CC
95
96
97#endif // _RWSTD_RW_NEW_H_INCLUDED
#define _NEW_THROWS(args)
Definition _defs.h:1160