On 12/11/17 16:45, Tom Lane wrote:
>> I guess the question is whether we would rather be able to have users
>> continue to use older C++ compilers, or be super picky about static
>> assertions.
>
> Uh, what is this "continue to use" bit? We've never supported
> building the backend with C++ compilers.
The problem is static assertions in inline functions in header files.
We do support using the header files in C++ extensions. But now there
is a problem that if a C++ extension happens to pull in a header file
that has a static assertion, it doesn't compile anymore, but it used to
before the static assertion was introduced.
(Currently, we have very few static assertions in header files, so the
problem is not relevant in practice yet, but the use of both static
assertions and inline functions is clearly expanding.)
> (BTW, why is it that we can't fall back on the negative-width-bitfield
> trick for old g++?)
The complaint is
error: types may not be defined in 'sizeof' expressions
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services