mirror of
https://github.com/esp8266/Arduino.git
synced 2025-10-30 04:26:50 +03:00
exceptions: optionally enforce c++ standards (#6333)
* exceptions: 3 choices: legacy, std::new never returns 0, or exceptions enabled * arduino_new (doc, example, array)
This commit is contained in:
@@ -32,7 +32,7 @@ extern "C" void __cxa_pure_virtual(void) __attribute__ ((__noreturn__));
|
||||
extern "C" void __cxa_deleted_virtual(void) __attribute__ ((__noreturn__));
|
||||
|
||||
|
||||
#ifndef __cpp_exceptions
|
||||
#if !defined(__cpp_exceptions) && !defined(NEW_OOM_ABORT)
|
||||
void *operator new(size_t size)
|
||||
{
|
||||
void *ret = malloc(size);
|
||||
@@ -52,7 +52,7 @@ void *operator new[](size_t size)
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
#endif // arduino's std::new legacy
|
||||
|
||||
void __cxa_pure_virtual(void)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user