Re: Type assertions without GCC builtins - Mailing list pgsql-hackers

From Jelte Fennema-Nio
Subject Re: Type assertions without GCC builtins
Date
Msg-id DETRMJMKIDM8.3BE573TTUBI04@jeltef.nl
Whole thread Raw
In response to Re: Type assertions without GCC builtins  (Jelte Fennema-Nio <postgres@jeltef.nl>)
List pgsql-hackers
On Tue, 9 Dec 2025 at 13:43, Jelte Fennema-Nio <postgres@jeltef.nl> wrote:
> You mean use const_cast in c++ instead of a C-style cast? Would you
> still want to keep the static asserts.

I now understand that you meant to not remove these lines:
-#if defined(__cplusplus)
-#define unconstify(underlying_type, expr) const_cast<underlying_type>(expr)
-#define unvolatize(underlying_type, expr) const_cast<underlying_type>(expr)

So like the attached. I think that makes sense.

Attachment

pgsql-hackers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Re: [PATCH] Update comment in nodeBitmapHeapscan.c
Next
From: Dilip Kumar
Date:
Subject: Re: Proposal: Conflict log history table for Logical Replication