On 13.02.26 11:28, Jelte Fennema-Nio wrote:
Patch 3 makes copyObject work when using GCC or Clang with -std=c++11 by
introducing pg_exprtype.

Patch 4 starts using pg_exprtype in more places.

I found this paper

https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2927.htm

which led to the addition of typeof into the C standard.

It contains a section 'Why not "decltype"?' that explains how decltype is different, but it also explains that if typeof were added to C++, then it would be

    std::remove_reference_t<decltype(T)>

What I suggest we should do here is:

1. Add a configure test that checks if the C++ compiler supports typeof.

2. If not, #define typeof to the above expression.

Then code can continue to use typeof unchanged.



Reply via email to