Re: Make copyObject work in C++ - Mailing list pgsql-hackers

From Jelte Fennema-Nio
Subject Re: Make copyObject work in C++
Date
Msg-id CAGECzQS6pD+HZs7avaAtp6NmzCNWV+WBC=x0P+RxstDMC4J3-w@mail.gmail.com
Whole thread Raw
In response to Re: Make copyObject work in C++  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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



pgsql-hackers by date:

Previous
From: Hannu Krosing
Date:
Subject: Re: making tid and HOTness of UPDATE available to logical decoding plugins
Next
From: Sergey Soloviev
Date:
Subject: Introduce Index Aggregate - new GROUP BY strategy