From c6ce36d56cd5e874e60c3ba8a36cc77c307df718 Mon Sep 17 00:00:00 2001 From: Pharap <2933055+Pharap@users.noreply.github.com> Date: Sat, 18 Aug 2018 09:09:15 +0100 Subject: Add placement new operator --- cores/arduino/new.h | 1 + 1 file changed, 1 insertion(+) (limited to 'cores/arduino/new.h') diff --git a/cores/arduino/new.h b/cores/arduino/new.h index 6e1b68f..7690911 100644 --- a/cores/arduino/new.h +++ b/cores/arduino/new.h @@ -23,6 +23,7 @@ void * operator new(size_t size); void * operator new[](size_t size); +void * operator new(size_t size, void * ptr); void operator delete(void * ptr); void operator delete[](void * ptr); -- cgit v1.2.3-18-g5258 From 6a717473175cc7d900fe67bc071f7e7c72f01e29 Mon Sep 17 00:00:00 2001 From: Pharap <2933055+Pharap@users.noreply.github.com> Date: Fri, 26 Oct 2018 19:34:34 +0100 Subject: Add noexcept specifier to placement new operator The standard mandates that placement new should be have a noexcept specifier. --- cores/arduino/new.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cores/arduino/new.h') diff --git a/cores/arduino/new.h b/cores/arduino/new.h index 7690911..763f5cc 100644 --- a/cores/arduino/new.h +++ b/cores/arduino/new.h @@ -23,7 +23,7 @@ void * operator new(size_t size); void * operator new[](size_t size); -void * operator new(size_t size, void * ptr); +void * operator new(size_t size, void * ptr) noexcept; void operator delete(void * ptr); void operator delete[](void * ptr); -- cgit v1.2.3-18-g5258