Re: Change copyObject() to use typeof_unqual - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Change copyObject() to use typeof_unqual
Date
Msg-id 42d4d294-196f-46db-b9fb-baff751fb5c2@eisentraut.org
Whole thread Raw
In response to Re: Change copyObject() to use typeof_unqual  (Jelte Fennema-Nio <postgres@jeltef.nl>)
Responses Re: Change copyObject() to use typeof_unqual
List 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 by date:

Previous
From: Alexander Lakhin
Date:
Subject: Re: pg_plan_advice
Next
From: "Jelte Fennema-Nio"
Date:
Subject: Re: Change copyObject() to use typeof_unqual