epoc32/include/symcpp.h
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
     1.1 --- a/epoc32/include/symcpp.h	Wed Mar 31 12:27:01 2010 +0100
     1.2 +++ b/epoc32/include/symcpp.h	Wed Mar 31 12:33:34 2010 +0100
     1.3 @@ -1,9 +1,9 @@
     1.4  // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5  // All rights reserved.
     1.6  // This component and the accompanying materials are made available
     1.7 -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     1.8 +// under the terms of the License "ARM EABI LICENCE.txt"
     1.9  // which accompanies this distribution, and is available
    1.10 -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.11 +// in kernel/eka/compsupp.
    1.12  //
    1.13  // Initial Contributors:
    1.14  // Nokia Corporation - initial contribution.
    1.15 @@ -11,17 +11,10 @@
    1.16  // Contributors:
    1.17  //
    1.18  // Description:
    1.19 -// e32\compsupp\symcpp\symcpp.h
    1.20 -// This is a preinclude file for the symbian cpp specific defintions from RVCT2.2 onwards
    1.21 +// This is a preinclude file for the Symbian C++ specific defintions for RVCT.
    1.22  // 
    1.23  //
    1.24  
    1.25 -#ifdef __ARMCC_VERSION
    1.26 -#if (__ARMCC_VERSION < 220000 || __ARMCC_VERSION >= 230000)
    1.27 -#error This instantiation of the build requires use of RVCT 2.2
    1.28 -#endif
    1.29 -#endif
    1.30 -
    1.31  // Deal with operator new issues here
    1.32  #ifdef __cplusplus
    1.33  namespace std {
    1.34 @@ -29,20 +22,35 @@
    1.35  	extern const nothrow_t nothrow;
    1.36  }
    1.37  
    1.38 +#ifndef __OPERATOR_NEW_DECLARED__
    1.39 +#define __OPERATOR_NEW_DECLARED__
    1.40 +
    1.41 +/* e32cmn.h also declares these five overloads, but slightly differently, so use
    1.42 + * __OPERATOR_NEW_DECLARED__ to avoid the declarations here (included by compiler-specific
    1.43 + * pre-include files) from conflicting.
    1.44 + */
    1.45 +
    1.46  IMPORT_C void* operator new(unsigned int aSize) __NO_THROW;
    1.47  
    1.48  IMPORT_C void* operator new(unsigned int aSize,unsigned int aSize1) __NO_THROW;
    1.49  
    1.50  IMPORT_C void* operator new[](unsigned int aSize) __NO_THROW;
    1.51  
    1.52 +IMPORT_C void operator delete(void* aPtr) __NO_THROW;
    1.53 +
    1.54 +IMPORT_C void operator delete[](void* aPtr) __NO_THROW;
    1.55 +
    1.56 +#endif // !__OPERATOR_NEW_DECLARED__
    1.57 +
    1.58 +
    1.59 +/* The following four overloads are not declared by the generic Symbian headers, so
    1.60 + * do not need to be protected by __OPERATOR_NEW_DECLARED__.
    1.61 + */
    1.62 +
    1.63  IMPORT_C void* operator new(unsigned int aSize, const std::nothrow_t& aNoThrow) __NO_THROW;
    1.64  
    1.65  IMPORT_C void* operator new[](unsigned int aSize, const std::nothrow_t& aNoThrow) __NO_THROW;
    1.66  
    1.67 -IMPORT_C void operator delete(void* aPtr) __NO_THROW;
    1.68 -
    1.69 -IMPORT_C void operator delete[](void* aPtr) __NO_THROW;
    1.70 -
    1.71  IMPORT_C void operator delete(void* aPtr, const std::nothrow_t& aNoThrow) __NO_THROW;
    1.72  
    1.73  IMPORT_C void operator delete[](void* aPtr, const std::nothrow_t& aNoThrow) __NO_THROW;