1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Fixed an argument forwarding bug in StdFunctionCompat

This commit is contained in:
Tom Poole 2019-06-21 14:02:47 +01:00
parent 485feb47ed
commit e267e8d5ad

View file

@ -113,7 +113,7 @@ namespace std
/** Invokes the target of this function. */
Result operator() (Arguments... args) const
{
return (*functorHolderHelper) (args...);
return (*functorHolderHelper) (std::forward<Arguments> (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<Arguments> (args)...);
}
Functor f;