From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by sourceware.org (Postfix) with ESMTPS id AC5293856271 for ; Wed, 18 May 2022 17:39:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org AC5293856271 Received: by mail-wr1-x433.google.com with SMTP id h14so3704697wrc.6 for ; Wed, 18 May 2022 10:39:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:from:to:references:in-reply-to :content-transfer-encoding; bh=TguT0m4u+6d6yUsmmwJS9nH333DkzgVW7uMKGjNOaZg=; b=k9nIJz2rgR2qfDt+0+zpP/UN2bcksCAmJzAjrC+GaywiQZBt4HqbM+/+lKdy8F5Dqb e/v6rHcvMVwqSoh7MOsu30OriDBtAtxLaJaMUjQ2Ld0UrI2wBGARtNjK4TFeAlGndMqo VwYeSDaUHWzwkIASeufmKB0OIhvHR8Kz06vnqYOy6RBfF2o2fAj6IhpMPqYHBZVkITRm I4Lb7N9eYkxUvWvFz9qsJpGmXsxtoS8w1tNFEribTPHew10q7ivDMN8vLAbBqeGNWRdJ HDXG0LNhCA5j1ofbcwSBpH9ZhJrPb6RSnp7v+ot/tlfETuntAQ7MfhLRAGgI/jIDX9YA /aOA== X-Gm-Message-State: AOAM531xYChY3JilZbUuBRV7Hcaup31quRxwV7DP3VwNmosyvXmboua3 LmSXPRCjQvJ9dwrHrDpWQDUTezX8Kl8= X-Google-Smtp-Source: ABdhPJxKXPqNrwSzJ3ywzMQQbaEeLfXhdpGoNTG23LAL7yDkniU7N14G+Ub+5wcEot0SnW3H3xk1ow== X-Received: by 2002:a5d:64cc:0:b0:20c:6339:3790 with SMTP id f12-20020a5d64cc000000b0020c63393790mr685450wri.378.1652895595151; Wed, 18 May 2022 10:39:55 -0700 (PDT) Received: from [10.1.0.78] ([109.190.253.14]) by smtp.googlemail.com with ESMTPSA id p12-20020a05600c23cc00b003942a244ecbsm2256999wmb.16.2022.05.18.10.39.54 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 18 May 2022 10:39:54 -0700 (PDT) Message-ID: <1f41b3cc-218b-ee0e-be93-63a2629dd7a1@gmail.com> Date: Wed, 18 May 2022 19:39:53 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: [PATCH][_Hashtable] Fix insertion of range of type convertible to value_type PR 56112 Content-Language: fr From: =?UTF-8?Q?Fran=c3=a7ois_Dumont?= To: "libstdc++@gcc.gnu.org" References: <2fe3937d-1b9a-a547-bb41-225d3d5426a2@gmail.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00, BODY_8BITS, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_NUMSUBJECT, NICE_REPLY_A, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org 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: Wed, 18 May 2022 17:39:58 -0000 Still no chance to validate ? On 11/05/22 19:03, François Dumont wrote: > Gentle reminder ! > > On 05/05/22 19:37, François Dumont wrote: >> Hi >> >> Renewing my patch to fix PR 56112 but for the insert methods, I >> totally change it, now works also with move-only key types. >> >> I let you Jonathan find a better name than _ValueTypeEnforcer as >> usual :-) >> >> libstdc++: [_Hashtable] Insert range of types convertible to >> value_type PR 56112 >> >> Fix insertion of range of types convertible to value_type. Fix also >> when this value_type >> has a move-only key_type which also allow converted values to be moved. >> >> libstdc++-v3/ChangeLog: >> >>         PR libstdc++/56112 >>         * include/bits/hashtable_policy.h (_ValueTypeEnforcer): New. >>         * include/bits/hashtable.h >> (_Hashtable<>::_M_insert_unique_aux): New. >>         (_Hashtable<>::_M_insert(_Arg&&, const _NodeGenerator&, >> true_type)): Use latters. >>         (_Hashtable<>::_M_insert(_Arg&&, const _NodeGenerator&, >> false_type)): Likewise. >>         (_Hashtable(_InputIterator, _InputIterator, size_type, const >> _Hash&, const _Equal&, >>         const allocator_type&, true_type)): Use this.insert range. >>         (_Hashtable(_InputIterator, _InputIterator, size_type, const >> _Hash&, const _Equal&, >>         const allocator_type&, false_type)): Use _M_insert. >>         * testsuite/23_containers/unordered_map/cons/56112.cc: Check >> how many times conversion >>         is done. >>         (test02): New test case. >>         * testsuite/23_containers/unordered_set/cons/56112.cc: New test. >> >> Tested under Linux x86_64. >> >> Ok to commit ? >> >> François >> >