diff --git a/include/TGUI/Signal.hpp b/include/TGUI/Signal.hpp index fd1d8d6c..1aca71bb 100644 --- a/include/TGUI/Signal.hpp +++ b/include/TGUI/Signal.hpp @@ -598,15 +598,15 @@ namespace tgui // std::invoke only exists in c++17 so we use our own implementation to support c++14 compilers // Visual Studio compiler did not like it when the function was called "invoke" template ::type>::value>::type* = nullptr> - TGUI_CONSTEXPR decltype(auto) invokeFunc(Func&& func, Args&&... args) + void invokeFunc(Func&& func, Args&&... args) { - return std::mem_fn(func)(std::forward(args)...); + std::mem_fn(func)(std::forward(args)...); } template ::type>::value>::type* = nullptr> - TGUI_CONSTEXPR decltype(auto) invokeFunc(Func&& func, Args&&... args) + void invokeFunc(Func&& func, Args&&... args) { - return std::forward(func)(std::forward(args)...); + std::forward(func)(std::forward(args)...); } // The binder will figure out the unbound parameters and bind them if they correspond to what the signal sends