From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 4779F3858D33 for ; Thu, 9 Nov 2023 00:57:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4779F3858D33 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 4779F3858D33 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699491459; cv=none; b=RmsqloGnUfivXX/+4LzjUwPfyidgr9cu1OuRYlpMRJjUpba0vGKsEx0cD92/+ljMpNETaZuZoWJdpD5/6knR6tLbwBO9baVoCtUFgfjJEUesHVhZ2a8/EvWhLxD+9gqUmmfiiI8UJpC9oEArJCb7jBVJiugYwg8UZwADec/DUA4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699491459; c=relaxed/simple; bh=BoSZi6/yyBdTt86gCjcJeWPBNwV6tenVH/tjoyqJBAQ=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=kMAI/ddBO0mMKiHAErZwtqfIUZJPx08cbv/nSVgxVhZ761Mj25L+UIBkd1+K4rz+vq5vrW/34+fKHnfL48saBkDIpjUPAq7Va+air5ikvoAxdCrfF/UWpMLrnoh+G/NoSBO0FHRVD2B0JYf6N2bGQzbEBRp06hzfXvg7Cp/F02o= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699491458; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yTD5H5DaCdBI04YGO2exnN637nfLmvRv1MDqlwiTSc0=; b=emM/nCI1j43d+WIRXBrm05fTWnCVem4Ibq2Xh/s7aKa9aNF513ErosQvuFURJy2t0SAxFM 8p4CQri7OkFGyWisr/M15UTZV2Qks+twz4R/E5d96Fue1bhmzP3PmxwEEMi7V4Ufh4PPzA WSv9Bghkarhi47ma3Kh2UObF9RtwJF8= Received: from mail-yw1-f198.google.com (mail-yw1-f198.google.com [209.85.128.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-218-oFs8bSSrPMmFN4VNr2pjqg-1; Wed, 08 Nov 2023 19:57:34 -0500 X-MC-Unique: oFs8bSSrPMmFN4VNr2pjqg-1 Received: by mail-yw1-f198.google.com with SMTP id 00721157ae682-5af16e00fadso4811687b3.0 for ; Wed, 08 Nov 2023 16:57:34 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699491454; x=1700096254; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yTD5H5DaCdBI04YGO2exnN637nfLmvRv1MDqlwiTSc0=; b=H/g+SpfpOdnydSsVp4LNS38cTO1SdJN5bGfUJ1vIhfMjYpgWY46WfOeVmmKEpp46j6 qRk3DhyLDoeupMlHolcIkErdXRvFXQapZ8hRGQiTFG6Wd0RFekUdWJwauRdc4ItwmyvE IUSZPZ6kF54fKGZwjYrNjVXAKXROzQb9p49xPEZ8SQ5q9S9e2UHU0OXmM/xIe1kLkk83 n2h3JFwIRURdX6M+ngJIT5cebLGVXkFq2UWycx9jqd1uqPdu+iGyWPVyVHHUN4cRurvO W+o7izivAQp97nXtYK/x7qhgJoXxijLr92GD5xW2tb3uWiwbbspRrMeNVEy4Cuic97iR Oq7A== X-Gm-Message-State: AOJu0YyLqH4vErgEize2neHw2hL/zayVGLJSFyyuqjmgn17t/RnG+A0Q SAcQmo6ds6Nibfm9gVKp3rAt3vFYBmHoTDe9pVhcebUKTMvqTOLrt6p4TKLgNMzJiL5YDppStan 6dyOTvX1kKZHe6a9+GMEUyad+8sIKZ5+Pyg== X-Received: by 2002:a0d:cb17:0:b0:5a7:bc79:9618 with SMTP id n23-20020a0dcb17000000b005a7bc799618mr3505838ywd.12.1699491454265; Wed, 08 Nov 2023 16:57:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IFsPUbhZbK4rgFfz0l3nVN8POcT+2OZKJ52sD5fdayFxjK6ljeo4XXC3ciIY/SQI7GCR7/0Pgeb2HD/sV1nBII= X-Received: by 2002:a0d:cb17:0:b0:5a7:bc79:9618 with SMTP id n23-20020a0dcb17000000b005a7bc799618mr3505832ywd.12.1699491454026; Wed, 08 Nov 2023 16:57:34 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Jonathan Wakely Date: Thu, 9 Nov 2023 00:57:23 +0000 Message-ID: Subject: Re: [PATCH][_Hahstable] Use RAII to guard node pointer while constructing To: =?UTF-8?Q?Fran=C3=A7ois_Dumont?= Cc: "libstdc++" , gcc-patches X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-6.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Wed, 8 Nov 2023 at 20:00, Fran=C3=A7ois Dumont wr= ote: > > Another proposal to use RAII rather than __try/__catch block. > > libstdc++: [_Hashtable] Use RAII type to guard node while constructing va= lue > > 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.