Re: Proposal: Add more compile-time asserts to exposeinconsistencies. - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Proposal: Add more compile-time asserts to exposeinconsistencies.
Date
Msg-id 20190919010740.GC22307@paquier.xyz
Whole thread Raw
In response to Re: Proposal: Add more compile-time asserts to expose inconsistencies.  (ilmari@ilmari.org (Dagfinn Ilmari Mannsåker))
Responses Re: Proposal: Add more compile-time asserts to exposeinconsistencies.
RE: Proposal: Add more compile-time asserts to exposeinconsistencies.
List 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

Attachment

pgsql-hackers by date:

Previous
From: "Smith, Peter"
Date:
Subject: RE: Proposal: Add more compile-time asserts to exposeinconsistencies.
Next
From: David Steele
Date:
Subject: Re: backup manifests