public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
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: Wed, 22 May 2024 06:50:33 +0200	[thread overview]
Message-ID: <4dcef9f3-6867-4615-9e24-bb8606e4691d@gmail.com> (raw)
In-Reply-To: <6d58a734-dc69-4c38-8b31-f5f937824c15@gmail.com>

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
>

  reply	other threads:[~2024-05-22  4:50 UTC|newest]

Thread overview: 4+ 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 [this message]
2024-06-06 17:02   ` François Dumont
2024-06-24  4:53     ` François Dumont

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=4dcef9f3-6867-4615-9e24-bb8606e4691d@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).