Re: [HACKERS] static assertions in C++

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] static assertions in C++
Date: 2017-11-29 22:33:55
Message-ID: 27233.1511994835@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andres Freund <andres(at)anarazel(dot)de> writes:
> On 2017-11-29 16:39:14 -0500, Tom Lane wrote:
>> Andres Freund <andres(at)anarazel(dot)de> writes:
>>> FWIW, I think that's a perfectly reasonable choice. Adding complications
>>> in making static assertions work for random archaic compilers when
>>> compiling with c++ just doesn't seem worth more than a few mins of
>>> thought.

>> I don't think anyone is advocating that we need to develop a solution
>> that works, at least not pending somebody actually complaining that
>> they want to build PG with an ancient C++ compiler. I just want
>> "we don't support this" to be spelled "#error", rather than dumping off
>> a load of reasoning about what might happen without functioning static
>> asserts --- on a weird compiler, no less --- onto our future selves.

> C++ static asserts are somewhat new (C++11), so I'm unconvinced by that.

Wait a minute --- you were just saying that only archaic C++ compilers
were at issue. You don't get to have that both ways.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2017-11-29 22:40:49 Re: [HACKERS] Refactoring identifier checks to consistently use strcmp
Previous Message Tom Lane 2017-11-29 22:32:02 Re: [HACKERS] postgres_fdw bug in 9.6