Re: Make copyObject work in C++
| От | Peter Eisentraut |
|---|---|
| Тема | Re: Make copyObject work in C++ |
| Дата | |
| Msg-id | 8f8776be-6d8f-4e1c-8d21-e55052edd91b@eisentraut.org обсуждение |
| Ответ на | Re: Make copyObject work in C++ ("Jelte Fennema-Nio" <postgres@jeltef.nl>) |
| Ответы |
Re: Make copyObject work in C++
|
| Список | pgsql-hackers |
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.
В списке pgsql-hackers по дате отправления: