From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [IPv6:2a00:1450:4864:20::232]) by sourceware.org (Postfix) with ESMTPS id 603D83858D1E; Wed, 22 May 2024 04:50:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 603D83858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 603D83858D1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::232 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716353444; cv=none; b=TAU4n3nQ/J+5C7mC6hKuC1MIMkyWV41Fx+4O2d56i9cruBXmdv+wQuFdPWfefGzLyA46sFLXHdf3ATMNKvblEN74GTsY4jz7DrkvCic30VkEqqaJha/wGxUlANAufCG8n4kRjY1OOXqd8SyUJxJ8MI2I+3pSo126wqXcQdRmkss= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716353444; c=relaxed/simple; bh=cszLXdY0I24jYD5Rgu28CCQUiDk4dRSd6akm9hiEWgU=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:From:To; b=Q8eGszLcWYMyieh/H03vK0CF3hRAzg+p/eSF7BWy/gkl3bXqbSbmsmkg8FAm7Iyn3wilGcJ3qS/QchiiS8lE2aIMsjlGD84qyPmX8AW1mJBvILC+xfBR/bYtBiMv+DGhvuS9H0BOKi68f8XVGFb4iSbu775Fnyh/6OYi4D5JRrY= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lj1-x232.google.com with SMTP id 38308e7fff4ca-2e724bc466fso37570361fa.3; Tue, 21 May 2024 21:50:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716353440; x=1716958240; darn=gcc.gnu.org; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:from:subject:user-agent:mime-version:date:message-id:from:to :cc:subject:date:message-id:reply-to; bh=nTfonLFCmISrcC88z9ZDeiInsjbvu+hH2e4H1/fXjDk=; b=jFC9eCahj2sYL+bEbCuyEqveGBr4+QMXFO+tbR0txitpNaDgutyGViFJ0pbeqeWrxH wPgYm99A7j4br1/VqkKfC9TUuvjdjLi2QURmQEfuFZQWY9IobpG8sV3IAG6gJeaDKVpj SxnoLaCpYLyk5e3hnVPBL2B0eiBaGvOM82M08NGCA7XUw+tJpnksJMDVyzL1bpnjLjjw 5OC+uQaST+eEz8+RfWvaujL3lVqMKUYoKxxbDH/qfNwOZHbr2E0Onshkv4tn9AUKmRib BArJql3S5zt6PjqRhpH/IQEWa3evJoEM3urQJKwWg5rfK9xB3GoxZMWTlvVBo7Bdz/v2 zqIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716353440; x=1716958240; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:from:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=nTfonLFCmISrcC88z9ZDeiInsjbvu+hH2e4H1/fXjDk=; b=NzyxPbo8XMcI0FFpc+B3DPrv5EpKGZvxznMkUa4WDZxVpWXiKL0FcLk8ZyM8HjgNCW Tdjh4BlW1pfyYveyhL/lQRFpFttyui10K8/BmXK7N+QOUtEI0ZXvowwL1z5m+0teg6Nx BsdSIBmMzWe5pipnGfhwaYa1uyAR8t7+oNt842lIrn0+0lOUlvxlDQIZDP4/EqvaleAy MtilQ9JSWsdq3ftHzvmjOv2TW5PrrokPhzULHCu+QFXp3d/GFW8SsuMOn/GMrhJJG6Qr Q6VR461NXEF/LDod7KpcpyFyJnmnwtJAB7Gnu3Jb1JDZ1/FBShfoi51s2IOx9lYmUdVX /cBQ== X-Gm-Message-State: AOJu0YzSuNYQC8M6JGS0++NxSv7hAq8+7PY+Y0/w/G8RQgp4OuuD4JQQ xsPBekXKrjSNFBIbZd7cvjPOqknPRMcyEDhjh81vJCBHgSU+nOufiXhhzA== X-Google-Smtp-Source: AGHT+IFCdritJVxbDuosmJ4TjRzI+0MNhtN909btk0Nleve0v766WYbLwz8gtH55T6Yw4QFQnW9o4g== X-Received: by 2002:a05:651c:510:b0:2e5:59a:591b with SMTP id 38308e7fff4ca-2e94933bc2dmr8454121fa.0.1716353439617; Tue, 21 May 2024 21:50:39 -0700 (PDT) Received: from [10.34.0.76] ([89.207.171.102]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-57835cd879bsm194441a12.95.2024.05.21.21.50.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 21 May 2024 21:50:39 -0700 (PDT) Message-ID: <4dcef9f3-6867-4615-9e24-bb8606e4691d@gmail.com> Date: Wed, 22 May 2024 06:50:33 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH][_Hashtable] Fix some implementation inconsistencies From: =?UTF-8?Q?Fran=C3=A7ois_Dumont?= To: libstdc++ Cc: gcc-patches References: <6d58a734-dc69-4c38-8b31-f5f937824c15@gmail.com> Content-Language: en-US In-Reply-To: <6d58a734-dc69-4c38-8b31-f5f937824c15@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Ping ? On 13/05/2024 06:33, François Dumont wrote: > libstdc++: [_Hashtable] Fix some implementation inconsistencies > >     Get rid of the different usages of the mutable keyword except in >     _Prime_rehash_policy where it is preserved for abi compatibility > reason. > >     Fix comment to explain that we need the computation of bucket > index noexcept >     to be able to rehash the container when needed. > >     For Standard instantiations through std::unordered_xxx containers > we already >     force caching of hash code when hash functor is not noexcep so it > is guarantied. > >     The static_assert purpose in _Hashtable on _M_bucket_index is thus > limited >     to usages of _Hashtable with exotic _Hashtable_traits. > >     libstdc++-v3/ChangeLog: > >             * include/bits/hashtable_policy.h > (_NodeBuilder<>::_S_build): Remove >             const qualification on _NodeGenerator instance. > (_ReuseOrAllocNode<>::operator()(_Args&&...)): Remove const > qualification. >             (_ReuseOrAllocNode<>::_M_nodes): Remove mutable. >             (_Insert_base<>::_M_insert_range): Remove _NodeGetter > const qualification. >             (_Hash_code_base<>::_M_bucket_index(const > _Hash_node_value<>&, size_t)): >             Simplify noexcept declaration, we already static_assert > that _RangeHash functor >             is noexcept. >             * include/bits/hashtable.h: Rework comments. Remove const > qualifier on >             _NodeGenerator& arguments. > > Tested under Linux x64, ok to commit ? > > François >