[utils] add a flag to use std new (#11937)

The noexcept placement new is standard in c++11. This commit adds a
config OPENTHREAD_CONFIG_USE_STD_NEW to allow using <new>. The default
behavior is still using OpenThread's own placement new implementation.
This commit is contained in:
Yakun Xu
2025-09-18 14:50:15 -07:00
committed by GitHub
parent fbc123940e
commit 3b3dd203be
4 changed files with 16 additions and 2 deletions
-2
View File
@@ -26,8 +26,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
// Disable OpenThread's own new implementation to avoid duplicate definition
#define OT_INCLUDE_COMMON_NEW_HPP_
#include "test_platform.h"
#include <map>