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][_Hahstable] Use RAII to guard node pointer while constructing
Date: Thu, 9 Nov 2023 00:57:23 +0000	[thread overview]
Message-ID: <CACb0b4ngHEDyPGqza7H2naMaCx4-ZH+_J+Hut-SVFJKE4k5fpw@mail.gmail.com> (raw)
In-Reply-To: <fbbce12d-7613-4040-933b-047601274911@gmail.com>

On Wed, 8 Nov 2023 at 20:00, François Dumont <frs.dumont@gmail.com> wrote:
>
> Another proposal to use RAII rather than __try/__catch block.
>
> libstdc++: [_Hashtable] Use RAII type to guard node while constructing value
>
> libstdc++-v3/ChangeLog:
>
>          * include/bits/hashtable_policy.h
>          (struct _NodePtrGuard<_HashtableAlloc, _NodePtr>): New.
>          (_ReuseAllocNode::operator()(_Args&&...)): Use latter to guard
> allocated node
>          pointer while constructing in place the value_type instance.
>
> Tested under Linux x64, ok to commit ?

Looks good, OK.


      reply	other threads:[~2023-11-09  0:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-08 20:00 François Dumont
2023-11-09  0:57 ` 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=CACb0b4ngHEDyPGqza7H2naMaCx4-ZH+_J+Hut-SVFJKE4k5fpw@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).