From e267e8d5ad81534da3f7d46aefc2b5959f2688d9 Mon Sep 17 00:00:00 2001 From: Tom Poole Date: Fri, 21 Jun 2019 14:02:47 +0100 Subject: [PATCH] Fixed an argument forwarding bug in StdFunctionCompat --- modules/juce_core/misc/juce_StdFunctionCompat.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/juce_core/misc/juce_StdFunctionCompat.h b/modules/juce_core/misc/juce_StdFunctionCompat.h index 5406cd9239..94c65f4a3c 100644 --- a/modules/juce_core/misc/juce_StdFunctionCompat.h +++ b/modules/juce_core/misc/juce_StdFunctionCompat.h @@ -113,7 +113,7 @@ namespace std /** Invokes the target of this function. */ Result operator() (Arguments... args) const { - return (*functorHolderHelper) (args...); + return (*functorHolderHelper) (std::forward (args)...); } bool operator== (decltype (nullptr)) const noexcept { return (functorHolderHelper == nullptr); } @@ -147,7 +147,7 @@ namespace std ReturnType operator()(Args... args) override final { - return f (args...); + return f (std::forward (args)...); } Functor f;