From a0f0d2ea43cfde933f4307cd79bbc5d2043acf79 Mon Sep 17 00:00:00 2001 From: Gunar Schorcht Date: Thu, 6 Jan 2022 11:18:50 +0100 Subject: [PATCH] sys/cpp_new_delete: add deleted operators required by C++14 --- sys/cpp_new_delete/new_delete.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sys/cpp_new_delete/new_delete.cpp b/sys/cpp_new_delete/new_delete.cpp index 7d88661518..28a78c0d34 100644 --- a/sys/cpp_new_delete/new_delete.cpp +++ b/sys/cpp_new_delete/new_delete.cpp @@ -14,6 +14,8 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + * SPDX-License-Identifier: LGPL-2.1-or-later */ #include @@ -35,6 +37,14 @@ void operator delete(void *ptr) { free(ptr); } +void operator delete(void *ptr, size_t) noexcept { + free(ptr); +} + void operator delete[](void *ptr) { free(ptr); } + +void operator delete [](void *ptr, size_t) noexcept { + free(ptr); +}