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

Smith, Peter <peters@fast.au.fujitsu.com>

From: "Smith, Peter" <peters@fast.au.fujitsu.com>
To: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: "andres@anarazel.de" <andres@anarazel.de>, "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>, "peter.eisentraut@2ndquadrant.com" <peter.eisentraut@2ndquadrant.com>, "tgl@sss.pgh.pa.us" <tgl@sss.pgh.pa.us>, "michael@paquier.xyz" <michael@paquier.xyz>, "ilmari@ilmari.org" <ilmari@ilmari.org>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2019-10-28T03:42:02Z
Lists: pgsql-hackers
From: Kyotaro Horiguchi <horikyota.ntt@gmail.com> Sent: Monday, 28 October 2019 1:26 PM

> It is missing the __cplusplus case?

My use cases for the macro are only in C code, so that's all I was interested in at this time.
If somebody else wants to extend the patch for C++ also (and test it) they can do.

Kind Regards,
---
Peter Smith
Fujitsu Australia





Commits

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

  2. Add support for static assertions in C++