From: "François Dumont" <frs.dumont@gmail.com>
To: libstdc++ <libstdc++@gcc.gnu.org>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH][_Hashtable] Fix some implementation inconsistencies
Date: Thu, 6 Jun 2024 19:02:28 +0200 [thread overview]
Message-ID: <303e89de-465d-4bf0-8acc-11ce1662582f@gmail.com> (raw)
In-Reply-To: <4dcef9f3-6867-4615-9e24-bb8606e4691d@gmail.com>
No chance ?
On 22/05/2024 06:50, François Dumont wrote:
> 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
>>
next prev parent reply other threads:[~2024-06-06 17:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-13 4:33 François Dumont
2024-05-22 4:50 ` François Dumont
2024-06-06 17:02 ` François Dumont [this message]
2024-06-24 4:53 ` François Dumont
2024-10-02 17:03 ` Jonathan Wakely
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=303e89de-465d-4bf0-8acc-11ce1662582f@gmail.com \
--to=frs.dumont@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=libstdc++@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).