epoc32/include/symcpp.h
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
equal deleted inserted replaced
3:e1b950c65cb4 4:837f303aceeb
     1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // 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
     4 // under the terms of the License "ARM EABI LICENCE.txt"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
     6 // in kernel/eka/compsupp.
     7 //
     7 //
     8 // Initial Contributors:
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
     9 // Nokia Corporation - initial contribution.
    10 //
    10 //
    11 // Contributors:
    11 // Contributors:
    12 //
    12 //
    13 // Description:
    13 // Description:
    14 // e32\compsupp\symcpp\symcpp.h
    14 // This is a preinclude file for the Symbian C++ specific defintions for RVCT.
    15 // This is a preinclude file for the symbian cpp specific defintions from RVCT2.2 onwards
       
    16 // 
    15 // 
    17 //
    16 //
    18 
       
    19 #ifdef __ARMCC_VERSION
       
    20 #if (__ARMCC_VERSION < 220000 || __ARMCC_VERSION >= 230000)
       
    21 #error This instantiation of the build requires use of RVCT 2.2
       
    22 #endif
       
    23 #endif
       
    24 
    17 
    25 // Deal with operator new issues here
    18 // Deal with operator new issues here
    26 #ifdef __cplusplus
    19 #ifdef __cplusplus
    27 namespace std {
    20 namespace std {
    28 	struct nothrow_t { };
    21 	struct nothrow_t { };
    29 	extern const nothrow_t nothrow;
    22 	extern const nothrow_t nothrow;
    30 }
    23 }
    31 
    24 
       
    25 #ifndef __OPERATOR_NEW_DECLARED__
       
    26 #define __OPERATOR_NEW_DECLARED__
       
    27 
       
    28 /* e32cmn.h also declares these five overloads, but slightly differently, so use
       
    29  * __OPERATOR_NEW_DECLARED__ to avoid the declarations here (included by compiler-specific
       
    30  * pre-include files) from conflicting.
       
    31  */
       
    32 
    32 IMPORT_C void* operator new(unsigned int aSize) __NO_THROW;
    33 IMPORT_C void* operator new(unsigned int aSize) __NO_THROW;
    33 
    34 
    34 IMPORT_C void* operator new(unsigned int aSize,unsigned int aSize1) __NO_THROW;
    35 IMPORT_C void* operator new(unsigned int aSize,unsigned int aSize1) __NO_THROW;
    35 
    36 
    36 IMPORT_C void* operator new[](unsigned int aSize) __NO_THROW;
    37 IMPORT_C void* operator new[](unsigned int aSize) __NO_THROW;
    37 
    38 
       
    39 IMPORT_C void operator delete(void* aPtr) __NO_THROW;
       
    40 
       
    41 IMPORT_C void operator delete[](void* aPtr) __NO_THROW;
       
    42 
       
    43 #endif // !__OPERATOR_NEW_DECLARED__
       
    44 
       
    45 
       
    46 /* The following four overloads are not declared by the generic Symbian headers, so
       
    47  * do not need to be protected by __OPERATOR_NEW_DECLARED__.
       
    48  */
       
    49 
    38 IMPORT_C void* operator new(unsigned int aSize, const std::nothrow_t& aNoThrow) __NO_THROW;
    50 IMPORT_C void* operator new(unsigned int aSize, const std::nothrow_t& aNoThrow) __NO_THROW;
    39 
    51 
    40 IMPORT_C void* operator new[](unsigned int aSize, const std::nothrow_t& aNoThrow) __NO_THROW;
    52 IMPORT_C void* operator new[](unsigned int aSize, const std::nothrow_t& aNoThrow) __NO_THROW;
    41 
       
    42 IMPORT_C void operator delete(void* aPtr) __NO_THROW;
       
    43 
       
    44 IMPORT_C void operator delete[](void* aPtr) __NO_THROW;
       
    45 
    53 
    46 IMPORT_C void operator delete(void* aPtr, const std::nothrow_t& aNoThrow) __NO_THROW;
    54 IMPORT_C void operator delete(void* aPtr, const std::nothrow_t& aNoThrow) __NO_THROW;
    47 
    55 
    48 IMPORT_C void operator delete[](void* aPtr, const std::nothrow_t& aNoThrow) __NO_THROW;
    56 IMPORT_C void operator delete[](void* aPtr, const std::nothrow_t& aNoThrow) __NO_THROW;
    49 
    57