From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by sourceware.org (Postfix) with ESMTPS id D80DC3858C20; Mon, 21 Feb 2022 20:54:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D80DC3858C20 Received: by mail-wr1-x429.google.com with SMTP id v12so29149196wrv.2; Mon, 21 Feb 2022 12:54:40 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=G3fBoHSQpeFhxgNjJTROoxPFJlDSlSmqzdrc22zjG4o=; b=VIqq6FnjIX4sZ51KOm2fK7/nQSRJBfZ9+slhh54YoGg27WqSorATKEHMALKYAfQMj2 74PirHR12MbokQT0JNSjCPE2r3Gj/GoOQNX4dMrJbf6dQoXGtBm2A8vrBGw3I4s6eyuw hoXwvELz5DwbesdG66IL6uwuhoMWdkuVog6Z86NDVyN8Jfcj1N7+804nlQNZZlUx6nd1 fraizdZwh4ZM7rfdYbAmdJM2jx0o+kNCz/fIwZ4ejd2OS6nNx7I5ejWQaYLf7WpyDgYs 5Xq4DTkCPL+o1PmYYWTvLgClfdimX6wdOPONqPKkzCe8irGHX49fmDi6MjeIVxFdo+2A 5tJg== X-Gm-Message-State: AOAM531+zlp7JGmHQouzKnlJ/YveZ5bhcH5yCB4bUhXOqXHw4pVEci9X pw6HUA815CwC2152jul0nKAzHlUW9rnHlKJUZEOq/X1R X-Google-Smtp-Source: ABdhPJxyZe05uQuoActv9Vm2Sx9WioNJvsc6wzQa8nk5sbF0PJ3FztGDxTc01xEYVNgC3IswGUS4IA1StSpjrwBdKcE= X-Received: by 2002:a5d:6701:0:b0:1e3:3ba6:d2e8 with SMTP id o1-20020a5d6701000000b001e33ba6d2e8mr16851438wru.221.1645476879846; Mon, 21 Feb 2022 12:54:39 -0800 (PST) MIME-Version: 1.0 References: <2fe3937d-1b9a-a547-bb41-225d3d5426a2@gmail.com> <87a6c4e2-9ba6-0c04-274a-5f204efe5d17@gmail.com> In-Reply-To: <87a6c4e2-9ba6-0c04-274a-5f204efe5d17@gmail.com> From: Jonathan Wakely Date: Mon, 21 Feb 2022 20:54:28 +0000 Message-ID: Subject: Re: [PATCH][_Hashtable] Fix insertion of range of type convertible to value_type PR 56112 To: =?UTF-8?Q?Fran=C3=A7ois_Dumont?= Cc: "libstdc++@gcc.gnu.org" , gcc-patches X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: libstdc++@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++ mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Feb 2022 20:54:43 -0000 On Mon, 21 Feb 2022 at 18:00, Fran=C3=A7ois Dumont via Libstdc++ < libstdc++@gcc.gnu.org> wrote: > Gentle reminder, it is important to have this for gcc 12. > Well, it's been broken since 4.8, so another year wouldn't be the end of the world ;-) I did start reviewing it, but I was trying to find a simpler way to solve it than adding all those overloads. I'll take another look tomorrow and either approve your patch or suggest something else. > > On 15/02/22 10:05, Fran=C3=A7ois Dumont wrote: > > We have a regression regarding management of types convertible to > > value_type. It is an occurrence of PR 56112 but for the insert method. > > > > libstdc++: [_Hashtable] Insert range of types convertible to > > value_type PR 56112 > > > > Fix insertion of range of types convertible to value_type. > > > > libstdc++-v3/ChangeLog: > > > > PR libstdc++/56112 > > * include/bits/hashtable.h > > (_Hashtable<>::_M_insert_unique_aux): New. > > (_Hashtable<>::_S_to_value): New. > > (_Hashtable<>::_M_insert(_Arg&&, const _NodeGenerator&, > > true_type)): Use latters. > > * testsuite/23_containers/unordered_map/cons/56112.cc: Use > > dg-do compile. > > * testsuite/23_containers/unordered_set/cons/56112.cc: New > > test. > > > > Tested under Linux x86_64. > > > > Ok to commit ? > > > > Fran=C3=A7ois > > >