UAVCAN_IMPLEMENT_PLACEMENT_NEW

This commit is contained in:
Pavel Kirienko
2014-05-05 19:28:28 +04:00
parent 8c8732d051
commit 581ee43231
5 changed files with 41 additions and 3 deletions
@@ -82,6 +82,16 @@
# include <cstdio>
#endif
/**
* Some C++ implementations are half-broken and do not implement the placement new operator.
* Setting this preprocessor symbol to 1 makes libuavcan implement its own operator new (std::size_t, void*),
* and its delete counterpart.
* This option may be removed in future.
*/
#ifndef UAVCAN_IMPLEMENT_PLACEMENT_NEW
# define UAVCAN_IMPLEMENT_PLACEMENT_NEW 0
#endif
namespace uavcan
{