This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

C6x C++ compiler - overload operators new/delete in a namespace



Hi Champs,

we have met compiler problem when trying to overload operators new/delete in a namespace. New/delete are offered in rts64plus.lib and compiler version is v6.0.20. Overloading new/delete without namespace is OK.

error: allocation operator may not be declared in a namespace
error: deallocation operator may not be declared in a namespace

Problematic case:

namespace NsAaMem
{

    void* operator new (size_t size, i32 poolId){}
}

And this is ok:

void* operator new (size_t size, i32 poolId){}

Can you help to check should this be supported by compiler or not? According to C++ standard this is ok.

 

Thanks and regards,

one and zero