Re: Proposal: Add more compile-time asserts to expose inconsistencies.

Kyotaro Horiguchi <horikyota.ntt@gmail.com>

From: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
To: peters@fast.au.fujitsu.com
Cc: andres@anarazel.de, pgsql-hackers@lists.postgresql.org, peter.eisentraut@2ndquadrant.com, tgl@sss.pgh.pa.us, michael@paquier.xyz, ilmari@ilmari.org, pgsql-hackers@postgresql.org
Date: 2019-10-28T02:26:06Z
Lists: pgsql-hackers
Hello.

At Mon, 28 Oct 2019 00:30:11 +0000, "Smith, Peter" <peters@fast.au.fujitsu.com> wrote in 
> From: Andres Freund <andres@anarazel.de> Sent: Sunday, 27 October 2019 12:03 PM
> > My proposal for this really was just to use this as a fallback for when static assert isn't available. Which in turn I was just suggesting because Tom wanted a fallback.
> 
> The patch is updated to use "extern" technique only when  "_Static_assert" is unavailable.
> 
> PSA.

It is missing the __cplusplus case?

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



Commits

  1. Add declaration-level assertions for compile-time checks

  2. Add support for static assertions in C++