[vlc-commits] utils.hpp: wrap: Fix argument forwarding
Hugo Beauzée-Luyssen
git at videolan.org
Tue Apr 21 10:15:54 CEST 2015
npapi-vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Wed Mar 25 14:24:40 2015 +0100| [4a836825551c4d3ad70c6c5c4e507a1ba6a77e17] | committer: Hugo Beauzée-Luyssen
utils.hpp: wrap: Fix argument forwarding
> http://git.videolan.org/gitweb.cgi/npapi-vlc.git/?a=commit;h=4a836825551c4d3ad70c6c5c4e507a1ba6a77e17
---
npapi/utils.hpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/npapi/utils.hpp b/npapi/utils.hpp
index 0ad6ce9..56d6805 100644
--- a/npapi/utils.hpp
+++ b/npapi/utils.hpp
@@ -484,7 +484,7 @@ namespace details
}
template <size_t Idx, typename T, typename... Args>
- void wrap( VariantArray& array, T arg, Args... args )
+ void wrap( VariantArray& array, T arg, Args&&... args )
{
wrap<Idx + 1>( array, std::forward<Args>( args )... );
array[Idx] = Variant(arg);
@@ -495,7 +495,7 @@ namespace details
// the template index parameter (to avoid filling to array in reverse order with
// sizeof...()
template <typename... Args>
-VariantArray wrap(Args... args)
+VariantArray wrap(Args&&... args)
{
auto array = VariantArray{sizeof...(args)};
details::wrap<0>( array, std::forward<Args>( args )... );
More information about the vlc-commits
mailing list