Re: Change copyObject() to use typeof_unqual

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>
Cc: Daniel Gustafsson <daniel(at)yesql(dot)se>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Change copyObject() to use typeof_unqual
Date: 2026-03-14 13:03:05
Message-ID: 42d4d294-196f-46db-b9fb-baff751fb5c2@eisentraut.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 13.03.26 17:18, Jelte Fennema-Nio wrote:
> On Fri, 13 Mar 2026 at 17:15, Jelte Fennema-Nio <postgres(at)jeltef(dot)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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jelte Fennema-Nio 2026-03-14 13:41:08 Re: Change copyObject() to use typeof_unqual
Previous Message Alexander Lakhin 2026-03-14 12:00:00 Re: pg_plan_advice