From da5d739fd94346374cfff8c071cc57078776932f Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Sat, 21 Aug 2010 18:01:16 +0200 Subject: [PATCH] gcc-4.5 fix (kinda) actually it was more of a bug in the code, but it worked in gcc-4.4 --- src/data-source.hh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/data-source.hh b/src/data-source.hh index 4d25852d..d3ec9c3b 100644 --- a/src/data-source.hh +++ b/src/data-source.hh @@ -98,11 +98,11 @@ namespace conky { template class register_data_source { template - static int factory(lua::state *l, const std::string &name, Args&&... args) + static int factory(lua::state *l, const std::string &name, const Args&... args) { T *t = static_cast(l->newuserdata(sizeof(T))); l->insert(1); - new(t) T(l, name, std::forward(args)...); + new(t) T(l, name, args...); l->settop(1); l->rawgetfield(lua::REGISTRYINDEX, priv::data_source_metatable); l->setmetatable(-2); @@ -114,9 +114,7 @@ namespace conky { register_data_source(const std::string &name, Args&&... args) { priv::do_register_data_source( name, std::bind(&factory, - std::placeholders::_1, - name, - std::forward(args)... + std::placeholders::_1, name, args... )); } };