[patch] libstdc++/66055 add missing constructors to unordered containers

Jonathan Wakely jwakely@redhat.com
Sat May 16 19:32:00 GMT 2015


On 16/05/15 11:39 +0200, François Dumont wrote:
>On 14/05/2015 15:47, Jonathan Wakely wrote:
>>Reported by Nathan and fixed by his patch. I added the tests.
>>
>>Tested powerpc64le-linux, committed to trunk. This should be
>>backported too.
>
>While backporting to debug and profile mode I noticed that those 
>constructors were not the only missing ones. So here is a patch to 
>complete them with debug and profile modes.

Great, thanks.

>@@ -233,6 +222,41 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
> 	: _M_h(__l, __n, __hf, __eql, __a)
>       { }
> 
>+      unordered_map(size_type __n, const allocator_type& __a)
>+      : unordered_map(__n, hasher(), key_equal(), __a)
>+      { }
>+
>+      unordered_map(size_type __n, const hasher& __hf,
>+		    const allocator_type& __a)
>+      : unordered_map(__n, __hf, key_equal(), __a)
>+      { }
>+
>+      template<typename _InputIterator>
>+	unordered_map(_InputIterator __first, _InputIterator __last,
>+		      size_type __n,
>+		      const allocator_type& __a)
>+	  : unordered_map(__first, __last, __n, hasher(), key_equal(), __a)

The indentation is inconsistent here, the ctor-initializer-list is
indented further than necessary

>@@ -891,7 +941,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
>        *  in the initializer list @a __l.
>        *
>        *  Note that the assignment completely changes the %unordered_multiset
>-       *  and that the resulting %unordered_set's size is the same as the number
>+       *  and that the resulting %unordered_multiset's size is the same as the number
>        *  of elements assigned.  Old data may be lost.

Please reformat this to stay below 80 columns.

OK with those two tiny adjustments, thanks!



More information about the Libstdc++ mailing list