On 25.01.26 18:52, Jelte Fennema-Nio wrote:
On Sun Jan 25, 2026 at 5:50 PM CET, Andres Freund wrote:
I'm pretty sceptical this is the right direction.

The only other option I can think of is not supporting C++ extension on
MSVC unless they are compiled with C++20 (or later). I don't
particularly care about Windows C++ extensions myself, so I personally
would be fine with that choice. It seems a bit harsh, though.

Maybe it would be enough to only support PG_MODULE_MAGIC (without arguments) in C++ for now.

That would still require removing the named initializers inside PG_MODULE_MAGIC_DATA(), but that's only an internal change, and it would not affect C-language users of PG_MODULE_MAGIC_EXT, and we wouldn't lock ourselves into a particular style in C++.

Then, maybe in a couple of years, when C++20 is more widely available, we could enable PG_MODULE_MAGIC_EXT for C++, or design an alternative construct for C++.



Reply via email to