Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vSWB4-00Gjuh-2E for pgsql-hackers@arkaria.postgresql.org; Mon, 08 Dec 2025 08:01:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vSWB3-00FUw9-0F for pgsql-hackers@arkaria.postgresql.org; Mon, 08 Dec 2025 08:01:01 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vSWB2-00FUw0-2X for pgsql-hackers@lists.postgresql.org; Mon, 08 Dec 2025 08:01:01 +0000 Received: from fout-a5-smtp.messagingengine.com ([103.168.172.148]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vSWB1-003oBE-0L for pgsql-hackers@lists.postgresql.org; Mon, 08 Dec 2025 08:01:00 +0000 Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfout.phl.internal (Postfix) with ESMTP id 790AFEC04A7; Mon, 8 Dec 2025 03:00:57 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-04.internal (MEProxy); Mon, 08 Dec 2025 03:00:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eisentraut.org; h=cc:cc:content-transfer-encoding:content-type:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=fm3; t=1765180857; x=1765267257; bh=KHvxswbiQQhqaK0R9hmGdzi/OYghHstA wKNQ6zNBC1g=; b=DyDAjecyeKCwVrkZdijb4Rre5mT4gQjtQdU41+cWi08lOTa7 cRehjlK+uqB7njLLa5qz1MElDCei+rgtM0V1rbGXerG0hXz76OGSdRyNSSIFWm5H orlmoRVIF48gP5vt9ikq4ektWcCPZsZi9/hUWusvZpxqx8HjvMvxfrTmvWWHr/+V n7Drps1QhTFIn1Z93BKBplqJVWcRHx4AvZTdU0NqlhEtm+897rcg45kL7CgkbyLN t6jdVNx4HEt9OonJaPxf7CozDDXRYa5jfAXBxu58P8uXtQJKat/6m5YTmT/BzYDd Rm8zC+zlIxG2ISaYOKYbJnNvfkke8ZAzIDGm7A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1765180857; x= 1765267257; bh=KHvxswbiQQhqaK0R9hmGdzi/OYghHstAwKNQ6zNBC1g=; b=e 8+h5cu7QneX97N2wMrzf/SGYUs5EnRN5pfEp+CBKKjQ1Dc7QhK5RMM5WOaGKKdUO B/LQqlxYcpTdtJ6WpOMi3QzlHXvdZDIMKUCLPFcLAZXCi7+wcGYFRJwWwlHOWv1J eLDkZnKRa9wGe33oy+ZlOXB97JUgeRCfVbSGdioVifjBfJ1dhp+clKVS0PLXT6Jz 2DZZsx+e+efa1mFJIqplnI5WkxMnNlHA1gARnG3jJEcqLNAzHCKuqjazFofh6YHM kEoA67CVRHpYXgJ53YH8LbXFHuSYYjNbTv2K8C0Na3qX7RTPaysB0nlc+8Nu2K5T xUtYXMxBEJMVL7NA29L/A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdduieduhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpefkffggfgfuvfevfhfhjggtgfesthejredttddvjeenucfhrhhomheprfgvthgvrhcu gfhishgvnhhtrhgruhhtuceophgvthgvrhesvghishgvnhhtrhgruhhtrdhorhhgqeenuc ggtffrrghtthgvrhhnpefgjedthfekfedtuefgieelheetleejgefhueeltdfhueetvdff udekfeejhfegheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehpvghtvghrsegvihhsvghnthhrrghuthdrohhrghdpnhgspghrtghpthhtohep gedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepthhglhesshhsshdrphhghhdrph grrdhushdprhgtphhtthhopehpohhsthhgrhgvshesjhgvlhhtvghfrdhnlhdprhgtphht thhopehpghhsqhhlqdhhrggtkhgvrhhssehlihhsthhsrdhpohhsthhgrhgvshhqlhdroh hrghdprhgtphhtthhopehthhhomhgrshdrmhhunhhrohesghhmrghilhdrtghomh X-ME-Proxy: Feedback-ID: ie0a040ee:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 8 Dec 2025 03:00:56 -0500 (EST) Message-ID: Date: Mon, 8 Dec 2025 09:00:55 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Make copyObject work in C++ To: Tom Lane , Jelte Fennema-Nio Cc: PostgreSQL Hackers , Thomas Munro References: <2844370.1765136707@sss.pgh.pa.us> Content-Language: en-US From: Peter Eisentraut In-Reply-To: <2844370.1765136707@sss.pgh.pa.us> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 07.12.25 20:45, Tom Lane wrote: > Hmm, this only fixes the one use-case. Admittedly we have only one > use-case, but as soon as we have another we'll have a new problem. > How about instead modifying the macro? Maybe something like this > in c.h (untested): > > #ifdef __cplusplus > #undef typeof > #define typeof decltype > #define HAVE_TYPEOF 1 > #endif AFAICT, both gcc and clang support typeof in C++ mode as well. So this kind of renaming could be confusing.