On 1/4/2012 3:51 PM, Andrew Tomazos wrote:
> Can someone please clarify the difference (if any) between the
> following two functions...
>
> template<class... Args>
> void f1(Args&&... args)
> {
> f(forward<Args>(args)...);
> }
>
> and
>
> template<class... Args>
> void f2(Args... args)
> {
> f(forward<Args>(args));
> }
Take it with a grain of salt, I don't know much about 'forward'
template. The '&&' notation designates an rvalue reference, so it
narrows down [a little bit] how types 'Args' are deduced, *I guess*.
V
--
I do not respond to top-posted replies, please don't ask
|