This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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)
       { 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]