Re: [HACKERS] static assertions in C++

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] static assertions in C++
Дата
Msg-id 11631.1504219029@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] static assertions in C++  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: [HACKERS] static assertions in C++  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Thu, Aug 31, 2017 at 4:43 PM, Peter Eisentraut
> <peter.eisentraut@2ndquadrant.com> wrote:
>> As discussed in
>> <https://www.postgresql.org/message-id/7775.1492448671@sss.pgh.pa.us>, a
>> more general solution would be to add specific C++ support for static
>> assertions in c.h.  Here is a patch for that, extracted from my
>> previously posted C++ patch set, but also a bit reworked from what was
>> previously posted.

> I like the concept of being more C++-compatible, but I'm not sure
> about the idea of not providing a workaround,

Meh.  We support ancient versions of C for backwards compatibility
reasons, but considering that compiling backend code with C++ isn't
officially supported at all, I'm not sure we need to cater to ancient
C++ compilers.  We could quibble about the value of "ancient" of
course --- Peter, do you have an idea when this construct became
widely supported?

I do think it might be a better idea to put a #error there instead
of silently disabling static assertions.  Then at least we could
hope to get complaints if anyone *is* trying to use ancient C++,
and thereby gauge whether it's worth working any harder for this.
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] static assertions in C++
Следующее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] static assertions in C++