VirtualBox

Changeset 39089 in vbox


Ignore:
Timestamp:
Oct 24, 2011 12:04:14 PM (13 years ago)
Author:
vboxsync
Message:

alloc-ef-cpp.cpp: Another build fix...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/alloc-ef-cpp.cpp

    r39088 r39089  
    5454
    5555/** The hint that we're throwing std::bad_alloc is not apprecitated by MSC. */
    56 #ifdef _MSC_VER
    57 # if _MSC_VER >= 1400
    58 #  define RT_EF_THROWS_BAD_ALLOC
     56#ifdef RT_EXCEPTIONS_ENABLED
     57# ifdef _MSC_VER
     58#  if _MSC_VER >= 1400
     59#   define RT_EF_THROWS_BAD_ALLOC
     60#  else
     61#   define RT_EF_THROWS_BAD_ALLOC    throw(std::bad_alloc)
     62#  endif
    5963# else
    60 #  define RT_EF_THROWS_BAD_ALLOC    throw(std::bad_alloc)
     64#  define RT_EF_THROWS_BAD_ALLOC     throw(std::bad_alloc)
    6165# endif
    62 #else
    63 # define RT_EF_THROWS_BAD_ALLOC     throw(std::bad_alloc)
    64 #endif
     66#else  /* !RT_EXCEPTIONS_ENABLED */
     67# define RT_EF_THROWS_BAD_ALLOC
     68#endif /* !RT_EXCEPTIONS_ENABLED */
    6569
    6670
     
    7478
    7579
    76 void *RT_EF_CDECL operator new(RT_EF_SIZE_T cb, const std::nothrow_t &) throw()
     80void *RT_EF_CDECL operator new(RT_EF_SIZE_T cb, const std::nothrow_t &) RT_NO_THROW
    7781{
    7882    void *pv = rtR3MemAlloc("new nothrow", RTMEMTYPE_NEW, cb, cb, NULL, ASMReturnAddress(), NULL, 0, NULL);
     
    8185
    8286
    83 void RT_EF_CDECL operator delete(void *pv) throw()
     87void RT_EF_CDECL operator delete(void *pv) RT_NO_THROW
    8488{
    8589    rtR3MemFree("delete", RTMEMTYPE_DELETE, pv, ASMReturnAddress(), NULL, 0, NULL);
     
    8791
    8892
    89 void RT_EF_CDECL operator delete(void * pv, const std::nothrow_t &) throw()
     93void RT_EF_CDECL operator delete(void * pv, const std::nothrow_t &) RT_NO_THROW
    9094{
    9195    rtR3MemFree("delete nothrow", RTMEMTYPE_DELETE, pv, ASMReturnAddress(), NULL, 0, NULL);
     
    110114
    111115
    112 void * RT_EF_CDECL operator new[](RT_EF_SIZE_T cb, const std::nothrow_t &) throw()
     116void * RT_EF_CDECL operator new[](RT_EF_SIZE_T cb, const std::nothrow_t &) RT_NO_THROW
    113117{
    114118    void *pv = rtR3MemAlloc("new[] nothrow", RTMEMTYPE_NEW_ARRAY, cb, cb, NULL, ASMReturnAddress(), NULL, 0, NULL);
     
    117121
    118122
    119 void RT_EF_CDECL operator delete[](void * pv) throw()
     123void RT_EF_CDECL operator delete[](void * pv) RT_NO_THROW
    120124{
    121125    rtR3MemFree("delete[]", RTMEMTYPE_DELETE_ARRAY, pv, ASMReturnAddress(), NULL, 0, NULL);
     
    123127
    124128
    125 void RT_EF_CDECL operator delete[](void *pv, const std::nothrow_t &) throw()
     129void RT_EF_CDECL operator delete[](void *pv, const std::nothrow_t &) RT_NO_THROW
    126130{
    127131    rtR3MemFree("delete[] nothrow", RTMEMTYPE_DELETE_ARRAY, pv, ASMReturnAddress(), NULL, 0, NULL);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette