Re: Make copyObject work in C++
Jelte Fennema-Nio <postgres@jeltef.nl>
From: Jelte Fennema-Nio <postgres@jeltef.nl>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Peter Eisentraut <peter@eisentraut.org>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>,
Thomas Munro <thomas.munro@gmail.com>
Date: 2025-12-08T15:31:30Z
Lists: pgsql-hackers
On Mon, 8 Dec 2025 at 15:51, Tom Lane <tgl@sss.pgh.pa.us> wrote: > > Peter Eisentraut <peter@eisentraut.org> writes: > > AFAICT, both gcc and clang support typeof in C++ mode as well. So this > > kind of renaming could be confusing. > > Hm, if that's true then we should not have to do anything ... > so why is Jelte reporting a problem? Seems it's related to -std=c++17 vs -std=gnu++17. I was compiling my code with the former, which throws the error in question[1]. Compiling with the latter works fine[2]. So I guess it depends what we want to require from C++ extensions. Should we require them to compile with gnu extensions? My opinion on that would be no. [1]: https://godbolt.org/z/fz567hs1r [2]: https://godbolt.org/z/cq1se55bn