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

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org>
Cc: "Smith, Peter" <peters(at)fast(dot)au(dot)fujitsu(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal: Add more compile-time asserts to expose inconsistencies.
Date: 2019-09-19 01:07:40
Message-ID: 20190919010740.GC22307@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Sep 18, 2019 at 04:46:30PM +0100, Dagfinn Ilmari Mannsåker wrote:
> Postgres doesn't seem to have it, but it would be possible to define a
> StaticAssertDecl macro that can be used at the file level, outside any
> function. See for example Perl's STATIC_ASSERT_DECL:
>
> https://github.com/Perl/perl5/blob/v5.30.0/perl.h#L3455-L3488

That sounds like a cleaner alternative. Thanks for the pointer.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Steele 2019-09-19 01:11:36 Re: backup manifests
Previous Message Smith, Peter 2019-09-19 00:47:37 RE: Proposal: Add more compile-time asserts to expose inconsistencies.