From a1a5c89bd2fdc40264f7fe45016c6d82ac3a433a Mon Sep 17 00:00:00 2001 From: Bruno Van de Velde Date: Wed, 30 Aug 2017 23:30:12 +0200 Subject: [PATCH] invoke function should return void as signal handlers can't return anything anyway --- include/TGUI/Signal.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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