From 868297dfb7eeba30f12a6db16288a00ff5aff51a Mon Sep 17 00:00:00 2001 From: kayomn Date: Sat, 25 Feb 2023 16:42:44 +0000 Subject: [PATCH] Add doc comment to operator[] overload in coral lib --- source/coral.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/coral.cpp b/source/coral.cpp index b12d493..7134d43 100644 --- a/source/coral.cpp +++ b/source/coral.cpp @@ -278,7 +278,11 @@ export void operator delete(void * pointer, coral::allocator & allocator) { } /** + * If `pointer` is a non-`nullptr` value, the referenced memory block will be deallocated using + * `allocator`. Otherwise, the function has no side-effects. * + * *Note*: passing a `pointer` value that was not allocated by `allocator` will result in erroneous + * behavior defined by the [coral::allocator] implementation. */ export void operator delete[](void * pointer, coral::allocator & allocator) { return allocator.deallocate(pointer);