public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely@redhat.com>
To: "François Dumont" <frs.dumont@gmail.com>
Cc: "libstdc++" <libstdc++@gcc.gnu.org>,
	gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH][_Hashtable] Fix some implementation inconsistencies
Date: Wed, 2 Oct 2024 18:03:20 +0100	[thread overview]
Message-ID: <CACb0b4ndckuJuHANpT7nh+Gb7jQ0AFo+S8wRksaP5UyOJTAWoA@mail.gmail.com> (raw)
In-Reply-To: <6d58a734-dc69-4c38-8b31-f5f937824c15@gmail.com>

On Mon, 13 May 2024 at 05:34, François Dumont <frs.dumont@gmail.com> 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 ?


OK for trunk, thanks.


      parent reply	other threads:[~2024-10-02 17:03 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
2024-06-24  4:53     ` François Dumont
2024-10-02 17:03 ` Jonathan Wakely [this message]

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=CACb0b4ndckuJuHANpT7nh+Gb7jQ0AFo+S8wRksaP5UyOJTAWoA@mail.gmail.com \
    --to=jwakely@redhat.com \
    --cc=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).