Bug 1189231 - Refine operator() call with perfect forwarding. r=nfroyd

This commit is contained in:
James Cheng 2015-07-30 21:16:00 -04:00
parent d4c8522d1e
commit 50aa18ff1e

View File

@ -263,9 +263,10 @@ public:
mFunction(aFunction)
{
}
R operator()(Args... aArgs)
template<typename... ActualArgs>
R operator()(ActualArgs&&... aArgs)
{
return ((*mRawPtr).*mFunction)(mozilla::Forward<Args>(aArgs)...);
return ((*mRawPtr).*mFunction)(mozilla::Forward<ActualArgs>(aArgs)...);
}
};