Re: [HACKERS] static assertions in C++ - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] static assertions in C++
Date
Msg-id 28813.1513030370@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] static assertions in C++  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: [HACKERS] static assertions in C++  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-hackers
Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
> On 12/11/17 16:45, Tom Lane wrote:
>> (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

Hmm, well, surely there's more than one way to do that; the sizeof
is just a convenient way to wrap it in C.  Wouldn't a typedef serve
just as well?

(Googling the topic shows that this wheel has been invented
before, BTW.)

            regards, tom lane


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] static assertions in C++
Next
From: Andres Freund
Date:
Subject: money type's overflow handling is woefully incomplete