Re: Make copyObject work in C++
Jelte Fennema-Nio <postgres@jeltef.nl>
From: Jelte Fennema-Nio <postgres@jeltef.nl>
To: David Geier <geidav.pg@gmail.com>
Cc: Peter Eisentraut <peter@eisentraut.org>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>,
Thomas Munro <thomas.munro@gmail.com>
Date: 2025-12-08T08:52:17Z
Lists: pgsql-hackers
On Mon, 8 Dec 2025 at 09:33, David Geier <geidav.pg@gmail.com> wrote: > Since C++11 there's std::remove_const which can be used as > std::remove_const<decltype(type)>::type. > > I'm not aware of anything pre C++11, except for rolling your own variant > of std::remove_const via template specialization. I think depending on C++11 sounds fine, since we're also depending on C11 and people tend to use much more recent C++ versions than C versions (so probably we could even require something higher).