new operator placement function not exist
Asked by
tony yu
I used g++-4.8 toolchain for a while. everything works great, until i need to new opeartor placement write function such as
new (&boardObj.stBrd) classTypeX {}; // won't do allocate, simply initialize the object. need to use this because of existance of virtual function.
the error message is
error: no matching function for call to 'operator new(sizetype, classTypeX*).
I searched the web. some site said that new(size_t, void*) is not implemented or so.
My compile option is
-mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mlittle-endian -mthumb -mthumb-interwork -fno-common -fno-builtin -std=c++11
The placement initialization is needed for some memory management function.
Is there any solution for this?
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- tony yu
- Solved:
- Last query:
- Last reply:
To post a message you must log in.