Re: Type assertions without GCC builtins
Jelte Fennema-Nio <postgres@jeltef.nl>
From: "Jelte Fennema-Nio" <postgres@jeltef.nl>
To: "Peter Eisentraut" <peter@eisentraut.org>
Cc: "Thomas Munro" <thomas.munro@gmail.com>, "PostgreSQL Hackers"
<pgsql-hackers@lists.postgresql.org>
Date: 2025-12-09T14:45:43Z
Lists: pgsql-hackers
Attachments
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.