Patchwork [v3] Implement LWG 1340

login
register
mail settings
Submitter Paolo Carlini
Date Sept. 13, 2010, 4:31 p.m.
Message ID <4C8E51EE.2000304@oracle.com>
Download mbox | patch
Permalink /patch/64612/
State New
Headers show

Comments

Paolo Carlini - Sept. 13, 2010, 4:31 p.m.
Hi,

tested x86_64-linux, committed.

Paolo.

////////////////////////
2010-09-13  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/forward_list.h (forward_list<>::resize(size_type,
	value_type)): Fix signature, per LWG 1340.
	* include/bits/forward_list.tcc: Adjust definition.

Patch

Index: include/bits/forward_list.h
===================================================================
--- include/bits/forward_list.h	(revision 164216)
+++ include/bits/forward_list.h	(working copy)
@@ -1002,7 +1002,7 @@ 
        *  populated with given data.
        */
       void
-      resize(size_type __sz, value_type __val);
+      resize(size_type __sz, const value_type& __val);
 
       /**
        *  @brief  Erases all the elements.
Index: include/bits/forward_list.tcc
===================================================================
--- include/bits/forward_list.tcc	(revision 164216)
+++ include/bits/forward_list.tcc	(working copy)
@@ -201,7 +201,7 @@ 
   template<typename _Tp, typename _Alloc>
     void
     forward_list<_Tp, _Alloc>::
-    resize(size_type __sz, value_type __val)
+    resize(size_type __sz, const value_type& __val)
     {
       iterator __k = before_begin();