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

From Peter Eisentraut
Subject Re: Make copyObject work in C++
Date
Msg-id e3213d37-f28c-4836-9daa-5e2ba20a7c49@eisentraut.org
Whole thread Raw
In response to Re: Make copyObject work in C++  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
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.



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Make copyObject work in C++
Next
From: "Jelte Fennema-Nio"
Date:
Subject: Re: Make copyObject work in C++