Re: Refactor compile-time assertion checks for C/C++

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Refactor compile-time assertion checks for C/C++
Date: 2020-03-07 21:44:48
Message-ID: 17445.1583617488@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Michael Paquier <michael(at)paquier(dot)xyz> writes:
> As of [1], I have been playing with the compile time assertions that
> we have for expressions, declarations and statements. And it happens
> that it is visibly possible to consolidate the fallback
> implementations for C and C++. Attached is the result of what I am
> getting at. I am adding this patch to next CF. Thoughts are
> welcome.

cfbot reports this doesn't work with MSVC. Not sure why --- maybe
it defines __cpp_static_assert differently than you're expecting?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2020-03-07 22:00:50 Re: ALTER TEXT SEARCH DICTIONARY tab completion
Previous Message Justin Pryzby 2020-03-07 21:40:10 Re: pg_ls_tmpdir to show directories and shared filesets (and pg_ls_*)