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