From 21f65f087d0894e00ebfdb4c98aaf8367b78cb6c Mon Sep 17 00:00:00 2001 From: Elad <18193363+elad335@users.noreply.github.com> Date: Mon, 18 Nov 2024 16:18:27 +0200 Subject: [PATCH] lockless.h: Fixup lf_array assert --- Utilities/lockless.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Utilities/lockless.h b/Utilities/lockless.h index 7a25d2b25d..82536ff96e 100644 --- a/Utilities/lockless.h +++ b/Utilities/lockless.h @@ -49,8 +49,8 @@ public: if (!next) { - // Do not allow access beyond one element more at a time - ensure(!installed && index - i == N); + // Do not allow access beyond many element more at a time + ensure(!installed && index - i < N * 2); installed = true; @@ -78,7 +78,7 @@ public: { lf_array* _this = this; - using return_t = decltype(func(std::declval())); + using return_t = std::invoke_result_t; while (_this) {