Re: Change copyObject() to use typeof_unqual

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Change copyObject() to use typeof_unqual
Дата
Msg-id 42d4d294-196f-46db-b9fb-baff751fb5c2@eisentraut.org
обсуждение исходный текст
Ответ на Re: Change copyObject() to use typeof_unqual  (Jelte Fennema-Nio <postgres@jeltef.nl>)
Ответы Re: Change copyObject() to use typeof_unqual
Список pgsql-hackers
On 13.03.26 17:18, Jelte Fennema-Nio wrote:
> On Fri, 13 Mar 2026 at 17:15, Jelte Fennema-Nio <postgres@jeltef.nl> wrote:
>> Attached should fix it.
> 
> Okay corrected in this v2, which fixes all of the places I could find.

This doesn't appear to work in this example program:

```
#include <type_traits>

#define mytypeof(x) std::remove_reference<decltype(x)>::value

void foo(void)
{
     int a;
     mytypeof(a) b;
}
```

Based on some internet search, it appears that ::type would work.  But 
it also appears to work without either one.




В списке pgsql-hackers по дате отправления: