aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-07-23 12:26:32 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-07-23 12:26:32 +0100
commit590ce9af177e5f901e4f3e2eac21b4e59320874d (patch)
tree25e670527f5ddb0cc914a447d13800375deff40f
parent41b3c32bf2fd6d51d00f7152847dead978f7faf6 (diff)
downloadpaludis-590ce9af177e5f901e4f3e2eac21b4e59320874d.tar.gz
paludis-590ce9af177e5f901e4f3e2eac21b4e59320874d.tar.xz
std::forward<> is our friend
-rw-r--r--paludis/util/make_named_values.hh8
1 files changed, 5 insertions, 3 deletions
diff --git a/paludis/util/make_named_values.hh b/paludis/util/make_named_values.hh
index 9e0dbe3..eba0c58 100644
--- a/paludis/util/make_named_values.hh
+++ b/paludis/util/make_named_values.hh
@@ -24,16 +24,18 @@
* A load of make_named_values functions.
*
* Bizarre oddity in C++98: you can only use an initialiser list when using
- * equals to initialise a newly constructed object. C++0x fixes this, but in the
- * mean time we can hack around it with this mess...
+ * equals to initialise a newly constructed object. C++0x fixes this, but GCC
+ * 4.4 is buggy, so for now we can't use braces directly...
*/
+#include <utility>
+
namespace paludis
{
template <typename R_, typename... T_>
R_ make_named_values(T_ && ... a)
{
- R_ result = { a... };
+ R_ result = { std::forward<T_>(a)... };
return result;
}
}