On Fri, 13 Mar 2026 at 17:00, Peter Eisentraut <[email protected]> wrote:
> that remove_reference_t is actually in C++14, which might explain this
> failure, if the compiler is in C++11 mode.

Yeah that's almost certainly it... Sorry about that.

> I don't understand the difference between remove_reference and
> remove_reference_t.

They are equivalent only the _t version as a bit less verbose.
Attached should fix it.
diff --git a/src/include/c.h b/src/include/c.h
index 2aab74d8b0e..b4a37661795 100644
--- a/src/include/c.h
+++ b/src/include/c.h
@@ -447,7 +447,7 @@ extern "C++"
 #ifdef pg_cxx_typeof
 #define typeof(x) pg_cxx_typeof(x)
 #elif !defined(HAVE_CXX_TYPEOF)
-#define typeof(x) std::remove_reference_t<decltype(x)>
+#define typeof(x) std::remove_reference<decltype(x)>::value
 #endif
 #ifndef HAVE_TYPEOF
 #define HAVE_TYPEOF 1

Reply via email to