From patchwork Sat May 16 09:39:34 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Fran=C3=A7ois_Dumont?= X-Patchwork-Id: 473002 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 5C2C2140B04 for ; Sat, 16 May 2015 19:40:06 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=Wj4X2ZCt; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:references :in-reply-to:content-type; q=dns; s=default; b=CqkWxbdn91YYHzajb fPJk24fv5qrx1hmjaGnNMicu5qUl5eFcOlu4S1sRbFyOnjoRh+JRtJnBHh3H3S5t PGUYqKV8lDiBzQddZqVuxvCNY+v8dtGpamkDaHHgMVpM8uBLxwG8o2YE5Qy/Gv1q kC2Sf0bm6zf97LM4GaGwGR5Nr0= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:references :in-reply-to:content-type; s=default; bh=zm5+2A/RcOFoyvxRrSBMTN5 kkWQ=; b=Wj4X2ZCt8KnZ/V3gTRcHSmEAh29CtsoaI2z40KI8Oi5PrrJTzR4XWws dKw+W7novOZt2Zys1mjtY4dg46hFbNGkg2psuatVSSxAF0rRiUtyS0I4fbIwH+0A A8UjieoDgmvJFWi7udq8eQxocWGvZAx21RlmxpF68Q/UN03JMcvI= Received: (qmail 110223 invoked by alias); 16 May 2015 09:39:44 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 110203 invoked by uid 89); 16 May 2015 09:39:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL, BAYES_50, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-wi0-f177.google.com Received: from mail-wi0-f177.google.com (HELO mail-wi0-f177.google.com) (209.85.212.177) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Sat, 16 May 2015 09:39:40 +0000 Received: by wizk4 with SMTP id k4so19345832wiz.1; Sat, 16 May 2015 02:39:37 -0700 (PDT) X-Received: by 10.194.77.44 with SMTP id p12mr26453113wjw.1.1431769176855; Sat, 16 May 2015 02:39:36 -0700 (PDT) Received: from [192.168.0.22] (arf62-1-82-237-250-248.fbx.proxad.net. [82.237.250.248]) by mx.google.com with ESMTPSA id yz3sm6520044wjc.19.2015.05.16.02.39.34 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 16 May 2015 02:39:35 -0700 (PDT) Message-ID: <55571056.2090807@gmail.com> Date: Sat, 16 May 2015 11:39:34 +0200 From: =?windows-1252?Q?Fran=E7ois_Dumont?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Jonathan Wakely , libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: Re: [patch] libstdc++/66055 add missing constructors to unordered containers References: <20150514134731.GS30202@redhat.com> In-Reply-To: <20150514134731.GS30202@redhat.com> 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. Moreover this patch: - Remove explicit keyword on one of the unordered_map constructor, surely the result of a copy/paste - Use constructor delegation as proposed by the Standard - Move code to follow Standard description order, it is easier this way to check that nothing is missing. * include/bits/unordered_map.h (unordered_map, unordered_multimap): Add missing constructors. * include/bits/unordered_set.h (unordered_set, unordered_multiset): Likewise. * include/debug/unordered_map (unordered_map, unordered_multimap): Add missing constructors. * include/debug/unordered_set (unordered_set, unordered_multiset): Likewise. * include/profile/unordered_map (unordered_map, unordered_multimap): Add missing constructors. * include/profile/unordered_set (unordered_set, unordered_multiset): Likewise. * testsuite/23_containers/unordered_map/cons/66055.cc: Add constructor invocations. * testsuite/23_containers/unordered_multimap/cons/66055.cc: Likewise. * testsuite/23_containers/unordered_multiset/cons/66055.cc: Likewise. * testsuite/23_containers/unordered_set/cons/66055.cc: Likewise. Ok to commit ? François diff --git a/libstdc++-v3/include/bits/unordered_map.h b/libstdc++-v3/include/bits/unordered_map.h index 069b859..6ace59d 100644 --- a/libstdc++-v3/include/bits/unordered_map.h +++ b/libstdc++-v3/include/bits/unordered_map.h @@ -146,17 +146,6 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER : _M_h(__n, __hf, __eql, __a) { } - unordered_map(size_type __n, const allocator_type& __a) - : _M_h(__n, hasher(), key_equal(), __a) - { } - - explicit - unordered_map(size_type __n, - const hasher& __hf, - const allocator_type& __a) - : _M_h(__n, __hf, key_equal(), __a) - { } - /** * @brief Builds an %unordered_map from a range. * @param __first An input iterator. @@ -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 + unordered_map(_InputIterator __first, _InputIterator __last, + size_type __n, + const allocator_type& __a) + : unordered_map(__first, __last, __n, hasher(), key_equal(), __a) + { } + + template + unordered_map(_InputIterator __first, _InputIterator __last, + size_type __n, const hasher& __hf, + const allocator_type& __a) + : unordered_map(__first, __last, __n, __hf, key_equal(), __a) + { } + + unordered_map(initializer_list __l, + size_type __n, + const allocator_type& __a) + : unordered_map(__l, __n, hasher(), key_equal(), __a) + { } + + unordered_map(initializer_list __l, + size_type __n, const hasher& __hf, + const allocator_type& __a) + : unordered_map(__l, __n, __hf, key_equal(), __a) + { } + /// Copy assignment operator. unordered_map& operator=(const unordered_map&) = default; @@ -872,16 +896,6 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER : _M_h(__n, __hf, __eql, __a) { } - unordered_multimap(size_type __n, const allocator_type& __a) - : _M_h(__n, hasher(), key_equal(), __a) - { } - - unordered_multimap(size_type __n, - const hasher& __hf, - const allocator_type& __a) - : _M_h(__n, __hf, key_equal(), __a) - { } - /** * @brief Builds an %unordered_multimap from a range. * @param __first An input iterator. @@ -958,6 +972,41 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER : _M_h(__l, __n, __hf, __eql, __a) { } + unordered_multimap(size_type __n, const allocator_type& __a) + : unordered_multimap(__n, hasher(), key_equal(), __a) + { } + + unordered_multimap(size_type __n, const hasher& __hf, + const allocator_type& __a) + : unordered_multimap(__n, __hf, key_equal(), __a) + { } + + template + unordered_multimap(_InputIterator __first, _InputIterator __last, + size_type __n, + const allocator_type& __a) + : unordered_multimap(__first, __last, __n, hasher(), key_equal(), __a) + { } + + template + unordered_multimap(_InputIterator __first, _InputIterator __last, + size_type __n, const hasher& __hf, + const allocator_type& __a) + : unordered_multimap(__first, __last, __n, __hf, key_equal(), __a) + { } + + unordered_multimap(initializer_list __l, + size_type __n, + const allocator_type& __a) + : unordered_multimap(__l, __n, hasher(), key_equal(), __a) + { } + + unordered_multimap(initializer_list __l, + size_type __n, const hasher& __hf, + const allocator_type& __a) + : unordered_multimap(__l, __n, __hf, key_equal(), __a) + { } + /// Copy assignment operator. unordered_multimap& operator=(const unordered_multimap&) = default; diff --git a/libstdc++-v3/include/bits/unordered_set.h b/libstdc++-v3/include/bits/unordered_set.h index c91eab8..8f9f12b 100644 --- a/libstdc++-v3/include/bits/unordered_set.h +++ b/libstdc++-v3/include/bits/unordered_set.h @@ -140,16 +140,6 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER : _M_h(__n, __hf, __eql, __a) { } - unordered_set(size_type __n, const allocator_type& __a) - : _M_h(__n, hasher(), key_equal(), __a) - { } - - unordered_set(size_type __n, - const hasher& __hf, - const allocator_type& __a) - : unordered_set(__n, __hf, key_equal(), __a) - { } - /** * @brief Builds an %unordered_set from a range. * @param __first An input iterator. @@ -226,6 +216,41 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER : _M_h(__l, __n, __hf, __eql, __a) { } + unordered_set(size_type __n, const allocator_type& __a) + : unordered_set(__n, hasher(), key_equal(), __a) + { } + + unordered_set(size_type __n, const hasher& __hf, + const allocator_type& __a) + : unordered_set(__n, __hf, key_equal(), __a) + { } + + template + unordered_set(_InputIterator __first, _InputIterator __last, + size_type __n, + const allocator_type& __a) + : unordered_set(__first, __last, __n, hasher(), key_equal(), __a) + { } + + template + unordered_set(_InputIterator __first, _InputIterator __last, + size_type __n, const hasher& __hf, + const allocator_type& __a) + : unordered_set(__first, __last, __n, __hf, key_equal(), __a) + { } + + unordered_set(initializer_list __l, + size_type __n, + const allocator_type& __a) + : unordered_set(__l, __n, hasher(), key_equal(), __a) + { } + + unordered_set(initializer_list __l, + size_type __n, const hasher& __hf, + const allocator_type& __a) + : unordered_set(__l, __n, __hf, key_equal(), __a) + { } + /// Copy assignment operator. unordered_set& operator=(const unordered_set&) = default; @@ -789,16 +814,6 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER : _M_h(__n, __hf, __eql, __a) { } - unordered_multiset(size_type __n, const allocator_type& __a) - : _M_h(__n, hasher(), key_equal(), __a) - { } - - unordered_multiset(size_type __n, - const hasher& __hf, - const allocator_type& __a) - : _M_h(__n, __hf, key_equal(), __a) - { } - /** * @brief Builds an %unordered_multiset from a range. * @param __first An input iterator. @@ -883,6 +898,41 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER : _M_h(std::move(__umset._M_h), __a) { } + unordered_multiset(size_type __n, const allocator_type& __a) + : unordered_multiset(__n, hasher(), key_equal(), __a) + { } + + unordered_multiset(size_type __n, const hasher& __hf, + const allocator_type& __a) + : unordered_multiset(__n, __hf, key_equal(), __a) + { } + + template + unordered_multiset(_InputIterator __first, _InputIterator __last, + size_type __n, + const allocator_type& __a) + : unordered_multiset(__first, __last, __n, hasher(), key_equal(), __a) + { } + + template + unordered_multiset(_InputIterator __first, _InputIterator __last, + size_type __n, const hasher& __hf, + const allocator_type& __a) + : unordered_multiset(__first, __last, __n, __hf, key_equal(), __a) + { } + + unordered_multiset(initializer_list __l, + size_type __n, + const allocator_type& __a) + : unordered_multiset(__l, __n, hasher(), key_equal(), __a) + { } + + unordered_multiset(initializer_list __l, + size_type __n, const hasher& __hf, + const allocator_type& __a) + : unordered_multiset(__l, __n, __hf, key_equal(), __a) + { } + /** * @brief %Unordered_multiset list assignment operator. * @param __l An initializer_list. @@ -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. */ unordered_multiset& diff --git a/libstdc++-v3/include/debug/unordered_map b/libstdc++-v3/include/debug/unordered_map index 0525367..41e20d7 100644 --- a/libstdc++-v3/include/debug/unordered_map +++ b/libstdc++-v3/include/debug/unordered_map @@ -129,6 +129,44 @@ namespace __debug const allocator_type& __a = allocator_type()) : _Base(__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 + unordered_map(_InputIterator __first, _InputIterator __last, + size_type __n, + const allocator_type& __a) + : unordered_map(__first, __last, __n, hasher(), key_equal(), __a) + { } + + template + unordered_map(_InputIterator __first, _InputIterator __last, + size_type __n, + const hasher& __hf, + const allocator_type& __a) + : unordered_map(__first, __last, __n, __hf, key_equal(), __a) + { } + + unordered_map(initializer_list __l, + size_type __n, + const allocator_type& __a) + : unordered_map(__l, __n, hasher(), key_equal(), __a) + { } + + unordered_map(initializer_list __l, + size_type __n, + const hasher& __hf, + const allocator_type& __a) + : unordered_map(__l, __n, __hf, key_equal(), __a) + { } + ~unordered_map() = default; unordered_map& @@ -550,6 +588,41 @@ namespace __debug const allocator_type& __a = allocator_type()) : _Base(__l, __n, __hf, __eql, __a) { } + unordered_multimap(size_type __n, const allocator_type& __a) + : unordered_multimap(__n, hasher(), key_equal(), __a) + { } + + unordered_multimap(size_type __n, const hasher& __hf, + const allocator_type& __a) + : unordered_multimap(__n, __hf, key_equal(), __a) + { } + + template + unordered_multimap(_InputIterator __first, _InputIterator __last, + size_type __n, + const allocator_type& __a) + : unordered_multimap(__first, __last, __n, hasher(), key_equal(), __a) + { } + + template + unordered_multimap(_InputIterator __first, _InputIterator __last, + size_type __n, const hasher& __hf, + const allocator_type& __a) + : unordered_multimap(__first, __last, __n, __hf, key_equal(), __a) + { } + + unordered_multimap(initializer_list __l, + size_type __n, + const allocator_type& __a) + : unordered_multimap(__l, __n, hasher(), key_equal(), __a) + { } + + unordered_multimap(initializer_list __l, + size_type __n, const hasher& __hf, + const allocator_type& __a) + : unordered_multimap(__l, __n, __hf, key_equal(), __a) + { } + ~unordered_multimap() = default; unordered_multimap& diff --git a/libstdc++-v3/include/debug/unordered_set b/libstdc++-v3/include/debug/unordered_set index b52268b..1e68461 100644 --- a/libstdc++-v3/include/debug/unordered_set +++ b/libstdc++-v3/include/debug/unordered_set @@ -129,6 +129,41 @@ namespace __debug const allocator_type& __a = allocator_type()) : _Base(__l, __n, __hf, __eql, __a) { } + unordered_set(size_type __n, const allocator_type& __a) + : unordered_set(__n, hasher(), key_equal(), __a) + { } + + unordered_set(size_type __n, const hasher& __hf, + const allocator_type& __a) + : unordered_set(__n, __hf, key_equal(), __a) + { } + + template + unordered_set(_InputIterator __first, _InputIterator __last, + size_type __n, + const allocator_type& __a) + : unordered_set(__first, __last, __n, hasher(), key_equal(), __a) + { } + + template + unordered_set(_InputIterator __first, _InputIterator __last, + size_type __n, const hasher& __hf, + const allocator_type& __a) + : unordered_set(__first, __last, __n, __hf, key_equal(), __a) + { } + + unordered_set(initializer_list __l, + size_type __n, + const allocator_type& __a) + : unordered_set(__l, __n, hasher(), key_equal(), __a) + { } + + unordered_set(initializer_list __l, + size_type __n, const hasher& __hf, + const allocator_type& __a) + : unordered_set(__l, __n, __hf, key_equal(), __a) + { } + ~unordered_set() = default; unordered_set& @@ -546,6 +581,41 @@ namespace __debug const allocator_type& __a = allocator_type()) : _Base(__l, __n, __hf, __eql, __a) { } + unordered_multiset(size_type __n, const allocator_type& __a) + : unordered_multiset(__n, hasher(), key_equal(), __a) + { } + + unordered_multiset(size_type __n, const hasher& __hf, + const allocator_type& __a) + : unordered_multiset(__n, __hf, key_equal(), __a) + { } + + template + unordered_multiset(_InputIterator __first, _InputIterator __last, + size_type __n, + const allocator_type& __a) + : unordered_multiset(__first, __last, __n, hasher(), key_equal(), __a) + { } + + template + unordered_multiset(_InputIterator __first, _InputIterator __last, + size_type __n, const hasher& __hf, + const allocator_type& __a) + : unordered_multiset(__first, __last, __n, __hf, key_equal(), __a) + { } + + unordered_multiset(initializer_list __l, + size_type __n, + const allocator_type& __a) + : unordered_multiset(__l, __n, hasher(), key_equal(), __a) + { } + + unordered_multiset(initializer_list __l, + size_type __n, const hasher& __hf, + const allocator_type& __a) + : unordered_multiset(__l, __n, __hf, key_equal(), __a) + { } + ~unordered_multiset() = default; unordered_multiset& diff --git a/libstdc++-v3/include/profile/unordered_map b/libstdc++-v3/include/profile/unordered_map index fdb4550..480faba 100644 --- a/libstdc++-v3/include/profile/unordered_map +++ b/libstdc++-v3/include/profile/unordered_map @@ -119,6 +119,41 @@ namespace __profile const allocator_type& __a = allocator_type()) : _Base(__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 + unordered_map(_InputIterator __first, _InputIterator __last, + size_type __n, + const allocator_type& __a) + : unordered_map(__first, __last, __n, hasher(), key_equal(), __a) + { } + + template + unordered_map(_InputIterator __first, _InputIterator __last, + size_type __n, const hasher& __hf, + const allocator_type& __a) + : unordered_map(__first, __last, __n, __hf, key_equal(), __a) + { } + + unordered_map(initializer_list __l, + size_type __n, + const allocator_type& __a) + : unordered_map(__l, __n, hasher(), key_equal(), __a) + { } + + unordered_map(initializer_list __l, + size_type __n, const hasher& __hf, + const allocator_type& __a) + : unordered_map(__l, __n, __hf, key_equal(), __a) + { } + unordered_map& operator=(const unordered_map&) = default; @@ -361,6 +396,41 @@ namespace __profile const allocator_type& __a = allocator_type()) : _Base(__l, __n, __hf, __eql, __a) { } + unordered_multimap(size_type __n, const allocator_type& __a) + : unordered_multimap(__n, hasher(), key_equal(), __a) + { } + + unordered_multimap(size_type __n, const hasher& __hf, + const allocator_type& __a) + : unordered_multimap(__n, __hf, key_equal(), __a) + { } + + template + unordered_multimap(_InputIterator __first, _InputIterator __last, + size_type __n, + const allocator_type& __a) + : unordered_multimap(__first, __last, __n, hasher(), key_equal(), __a) + { } + + template + unordered_multimap(_InputIterator __first, _InputIterator __last, + size_type __n, const hasher& __hf, + const allocator_type& __a) + : unordered_multimap(__first, __last, __n, __hf, key_equal(), __a) + { } + + unordered_multimap(initializer_list __l, + size_type __n, + const allocator_type& __a) + : unordered_multimap(__l, __n, hasher(), key_equal(), __a) + { } + + unordered_multimap(initializer_list __l, + size_type __n, const hasher& __hf, + const allocator_type& __a) + : unordered_multimap(__l, __n, __hf, key_equal(), __a) + { } + unordered_multimap& operator=(const unordered_multimap&) = default; diff --git a/libstdc++-v3/include/profile/unordered_set b/libstdc++-v3/include/profile/unordered_set index e1eb1a1..15950b9 100644 --- a/libstdc++-v3/include/profile/unordered_set +++ b/libstdc++-v3/include/profile/unordered_set @@ -125,6 +125,41 @@ namespace __profile : _Base(__l, __n, __hf, __eql, __a) { } + unordered_set(size_type __n, const allocator_type& __a) + : unordered_set(__n, hasher(), key_equal(), __a) + { } + + unordered_set(size_type __n, const hasher& __hf, + const allocator_type& __a) + : unordered_set(__n, __hf, key_equal(), __a) + { } + + template + unordered_set(_InputIterator __first, _InputIterator __last, + size_type __n, + const allocator_type& __a) + : unordered_set(__first, __last, __n, hasher(), key_equal(), __a) + { } + + template + unordered_set(_InputIterator __first, _InputIterator __last, + size_type __n, const hasher& __hf, + const allocator_type& __a) + : unordered_set(__first, __last, __n, __hf, key_equal(), __a) + { } + + unordered_set(initializer_list __l, + size_type __n, + const allocator_type& __a) + : unordered_set(__l, __n, hasher(), key_equal(), __a) + { } + + unordered_set(initializer_list __l, + size_type __n, const hasher& __hf, + const allocator_type& __a) + : unordered_set(__l, __n, __hf, key_equal(), __a) + { } + unordered_set& operator=(const unordered_set&) = default; @@ -346,6 +381,41 @@ namespace __profile : _Base(__l, __n, __hf, __eql, __a) { } + unordered_multiset(size_type __n, const allocator_type& __a) + : unordered_multiset(__n, hasher(), key_equal(), __a) + { } + + unordered_multiset(size_type __n, const hasher& __hf, + const allocator_type& __a) + : unordered_multiset(__n, __hf, key_equal(), __a) + { } + + template + unordered_multiset(_InputIterator __first, _InputIterator __last, + size_type __n, + const allocator_type& __a) + : unordered_multiset(__first, __last, __n, hasher(), key_equal(), __a) + { } + + template + unordered_multiset(_InputIterator __first, _InputIterator __last, + size_type __n, const hasher& __hf, + const allocator_type& __a) + : unordered_multiset(__first, __last, __n, __hf, key_equal(), __a) + { } + + unordered_multiset(initializer_list __l, + size_type __n, + const allocator_type& __a) + : unordered_multiset(__l, __n, hasher(), key_equal(), __a) + { } + + unordered_multiset(initializer_list __l, + size_type __n, const hasher& __hf, + const allocator_type& __a) + : unordered_multiset(__l, __n, __hf, key_equal(), __a) + { } + unordered_multiset& operator=(const unordered_multiset&) = default; diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/cons/66055.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/cons/66055.cc index 0d3e384..17efac55 100644 --- a/libstdc++-v3/testsuite/23_containers/unordered_map/cons/66055.cc +++ b/libstdc++-v3/testsuite/23_containers/unordered_map/cons/66055.cc @@ -28,3 +28,7 @@ using alloc_type = test_type::allocator_type; test_type h1(10, alloc_type()); test_type h2(10, hasher_type(), alloc_type()); +test_type h3(h1.begin(), h1.end(), 10, alloc_type()); +test_type h4(h1.begin(), h1.end(), 10, hasher_type(), alloc_type()); +test_type h5({ { 1, 1 } }, 10, alloc_type()); +test_type h6({ { 1, 1 } }, 10, hasher_type(), alloc_type()); diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multimap/cons/66055.cc b/libstdc++-v3/testsuite/23_containers/unordered_multimap/cons/66055.cc index c4d68ec..d99d352 100644 --- a/libstdc++-v3/testsuite/23_containers/unordered_multimap/cons/66055.cc +++ b/libstdc++-v3/testsuite/23_containers/unordered_multimap/cons/66055.cc @@ -28,3 +28,7 @@ using alloc_type = test_type::allocator_type; test_type h1(10, alloc_type()); test_type h2(10, hasher_type(), alloc_type()); +test_type h3(h1.begin(), h1.end(), 10, alloc_type()); +test_type h4(h1.begin(), h1.end(), 10, hasher_type(), alloc_type()); +test_type h5({ { 1, 1 } }, 10, alloc_type()); +test_type h6({ { 1, 1 } }, 10, hasher_type(), alloc_type()); diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multiset/cons/66055.cc b/libstdc++-v3/testsuite/23_containers/unordered_multiset/cons/66055.cc index 0680951..7ae17b7 100644 --- a/libstdc++-v3/testsuite/23_containers/unordered_multiset/cons/66055.cc +++ b/libstdc++-v3/testsuite/23_containers/unordered_multiset/cons/66055.cc @@ -28,3 +28,7 @@ using alloc_type = test_type::allocator_type; test_type h1(10, alloc_type()); test_type h2(10, hasher_type(), alloc_type()); +test_type h3(h1.begin(), h1.end(), 10, alloc_type()); +test_type h4(h1.begin(), h1.end(), 10, hasher_type(), alloc_type()); +test_type h5({ 1, 1 }, 10, alloc_type()); +test_type h6({ 1, 1 }, 10, hasher_type(), alloc_type()); diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/cons/66055.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/cons/66055.cc index 2ead0b1..73e223d 100644 --- a/libstdc++-v3/testsuite/23_containers/unordered_set/cons/66055.cc +++ b/libstdc++-v3/testsuite/23_containers/unordered_set/cons/66055.cc @@ -28,3 +28,7 @@ using alloc_type = test_type::allocator_type; test_type h1(10, alloc_type()); test_type h2(10, hasher_type(), alloc_type()); +test_type h3(h1.begin(), h1.end(), 10, alloc_type()); +test_type h4(h1.begin(), h1.end(), 10, hasher_type(), alloc_type()); +test_type h5({ 1, 1 }, 10, alloc_type()); +test_type h6({ 1, 1 }, 10, hasher_type(), alloc_type());