These macros were unintentionally using C++14 features. This replaces
them with valid C++11 code.
Tested locally by compiling with -std=c++11 (which reproduced the
original issue).
Author: Jelte Fennema-Nio <postgres@jeltef.nl>
Discussion: https://www.postgresql.org/message-id/flat/
92f9750f-c7f6-42d8-9a4a-
85a3cbe808f3%40eisentraut.org
#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)>::type
#endif
#ifndef HAVE_TYPEOF
#define HAVE_TYPEOF 1
#ifdef pg_cxx_typeof_unqual
#define typeof_unqual(x) pg_cxx_typeof_unqual(x)
#elif !defined(HAVE_CXX_TYPEOF_UNQUAL)
-#define typeof_unqual(x) std::remove_cv_t<std::remove_reference_t<decltype(x)>>
+#define typeof_unqual(x) std::remove_cv<std::remove_reference<decltype(x)>::type>::type
#endif
#ifndef HAVE_TYPEOF_UNQUAL
#define HAVE_TYPEOF_UNQUAL 1