This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[v3] Add missing C++0x pair constructor
- From: Paolo Carlini <pcarlini at suse dot de>
- To: Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 11 Nov 2007 16:57:35 +0100
- Subject: [v3] Add missing C++0x pair constructor
Hi,
tested x86_64-linux, committed to mainline.
Paolo.
/////////////////
2007-11-11 Howard Hinnant <hhinnant@apple.com>
* include/bits/stl_pair.h (pair<>::pair<>(_U1&&, _Arg0&&,
_Args&&...)): Add.
Index: include/bits/stl_pair.h
===================================================================
--- include/bits/stl_pair.h (revision 130083)
+++ include/bits/stl_pair.h (working copy)
@@ -111,6 +111,13 @@
: first(std::move(__p.first)),
second(std::move(__p.second)) { }
+ // http://gcc.gnu.org/ml/libstdc++/2007-08/msg00052.html
+ template<class _U1, class _Arg0, class... _Args>
+ pair(_U1&& __x, _Arg0&& __arg0, _Args&&... __args)
+ : first(std::forward<_U1>(__x)),
+ second(std::forward<_Arg0>(__arg0),
+ std::forward<_Args>(__args)...) { }
+
pair&
operator=(pair&& __p)
{