From 3005ac54ef738d118250cb2a5612347049ee992d Mon Sep 17 00:00:00 2001 From: Gabriel Ferreira Date: Sun, 7 Apr 2024 14:01:27 +0200 Subject: [PATCH] core: Allow bool callback functions --- src/core/model/callback.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/model/callback.h b/src/core/model/callback.h index f05e10407..8e3dafa8c 100644 --- a/src/core/model/callback.h +++ b/src/core/model/callback.h @@ -490,8 +490,10 @@ class Callback : public CallbackBase * of the first argument is a class derived from CallbackBase (i.e., a Callback). */ template , int> = 0, - typename... BArgs> + typename... BArgs, + std::enable_if_t && + std::is_invocable_r_v, + int> = 0> Callback(T func, BArgs... bargs) { // store the function in a std::function object