From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 8ATJAJSQMWVWWDIAWB0awg (envelope-from ) for ; Thu, 19 Oct 2023 16:24:52 -0400 Authentication-Results: simark.ca; dkim=fail reason="signature verification failed" (768-bit key; unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=Q3zlkJ7E; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 003B71E0C1; Thu, 19 Oct 2023 16:24:51 -0400 (EDT) Received: from server2.sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id E84C71E091 for ; Thu, 19 Oct 2023 16:24:49 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 76ED43857709 for ; Thu, 19 Oct 2023 20:24:49 +0000 (GMT) Received: from omta36.uswest2.a.cloudfilter.net (omta36.uswest2.a.cloudfilter.net [35.89.44.35]) by sourceware.org (Postfix) with ESMTPS id 7C66B3858D35 for ; Thu, 19 Oct 2023 20:24:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7C66B3858D35 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 7C66B3858D35 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=35.89.44.35 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697747078; cv=none; b=Cf3Kk/2/ogCcuDya6rA2YB/JZ+Wyg6YFDLGHkwWNgX4JC+baknBafC33Hedj/PcvcGqh/DhjGgjvda60ayP64xJw/FKbG5K7dcVCTY+K0hYSTu6wGkvf35FqSatpxnHmhywE6Zvlv/WbGiqy+yUOih+3yhmhl5Wi0AxXI+ghz5I= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697747078; c=relaxed/simple; bh=F1gWIjCr5KJFp622rPklJzv6S364S9GxIGaoB4viVQE=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=dZUyqjrG/1yA6bic8BK5tCch1AGZsJTeX0e5bAJtZmARQU9KYaBmFz+S050sLuYHk08QVlz6qmfFZVhFUlsnsXekaL9cPnR9gmcaewhtB5N15DD2ufIvFVOlKlEIh6mS1gTaoB8Y8kViCOrb+Pr4HgOiT57yrE/K64E5gnrxMWo= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from eig-obgw-5010a.ext.cloudfilter.net ([10.0.29.199]) by cmsmtp with ESMTPS id tY6jqMPG5hqFdtZZMqKC5f; Thu, 19 Oct 2023 20:24:36 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id tZZLq7smooIDwtZZLq238T; Thu, 19 Oct 2023 20:24:36 +0000 X-Authority-Analysis: v=2.4 cv=TP1W9npa c=1 sm=1 tr=0 ts=65319084 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=OWjo9vPv0XrRhIrVQ50Ab3nP57M=:19 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=bhdUkHdE2iEA:10 a=Qbun_eYptAEA:10 a=T_Alst9gAAAA:8 a=5putF8t-mIzEGkSNWJMA:9 a=DvZ5ixILWSEuw56YIEpp:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:References :Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=GhGNJxaYcqnglOiTzyc4Is+144TIPUiLYyxD5hGKogI=; b=Q3zlkJ7En/bgsMxWMLIY+sLrtE CSqF2c0qBkVHE+O1+g5MqmBQtQD7oWeO7aiSTAELaERlEcH7suIunTR1JjMwkHRNFaOXJV0hAI3qF jJrFz4T1AyGFVX278mItUQ5zG; Received: from 71-211-130-31.hlrn.qwest.net ([71.211.130.31]:55914 helo=prentzel) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.2) (envelope-from ) id 1qtZZL-0007mR-0u; Thu, 19 Oct 2023 14:24:35 -0600 From: Tom Tromey To: Pedro Alves Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [PATCH 4/7] Use try_emplace in index-write.c References: <20231016230527.1820819-1-tom@tromey.com> <20231016230527.1820819-5-tom@tromey.com> <74ae9885-03ef-45f2-901e-13dd7a69de85@palves.net> X-Attribution: Tom Date: Thu, 19 Oct 2023 14:24:36 -0600 In-Reply-To: <74ae9885-03ef-45f2-901e-13dd7a69de85@palves.net> (Pedro Alves's message of "Tue, 17 Oct 2023 09:56:20 +0100") Message-ID: <87wmviuzqz.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 71.211.130.31 X-Source-L: No X-Exim-ID: 1qtZZL-0007mR-0u X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 71-211-130-31.hlrn.qwest.net (prentzel) [71.211.130.31]:55914 X-Source-Auth: tom+tromey.com X-Email-Count: 6 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfMXGILuxzcoqpKzras1dSFQYyNMIWsx87yQkR5pU06u23S/HMtSUfabW+BCcqewReh+6v8fd8OoKYYc8xcURYhMXkSx1PV4cksrARGT6GkNgFGZThtuV uk1/dd4zaeXhgPiabwd//GXp5gSWGmbwnzb8cfm/AwzQUe+GX2EHCIBGCvec/MA/5HBKMiUEreKDXZaNDm6kvIgVZ9H6P2DgaWU= X-Spam-Status: No, score=-3018.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, JMQ_SPF_NEUTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org >>>>> "Pedro" == Pedro Alves writes: Pedro> A little odd to take a const ref to the returned pair instead of taking Pedro> it by value. Better yet, C++17 gives us structured bindings, which lets us Pedro> hide the ugly pair completely and use helpful names instead of first/second: Pedro> auto [it, ins] = symbol_hash_table.try_emplace (entry.cu_indices, Pedro> cpool.size ()); Pedro> How about we use it here? I made this change. Tom