<div dir="auto">Thanks for the response Richard.. I had myself to do the same recently on a c++17 project that I have, which is also c++20 friendly. But I also discovered that c++20 still has some issues in some current popular systems, such as google colab, so I was also forced to remove this nice feature.<div dir="auto">I can suggest you, if not using yet, to put flag -pedantic on g++, so that it will force the project to be iso compatible, otherwise it wont complain (but I dont know how to do it cross compiler, like msvc flags, g++, clang and so on.. very hard c++ world :D hahaha)</div><div dir="auto">Best regards!</div><div dir="auto">Igor</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Em sáb., 28 de out. de 2023 23:57, Richard B. Kreckel <<a href="mailto:kreckel@in.terlu.de">kreckel@in.terlu.de</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Igor,<br>
<br>
Thank you for pointing out this little transgression of the language <br>
standard version.<br>
<br>
On 10/1/23 00:57, Igor Machado wrote:<br>
> In the end, I managed to find and fix the error, so I wanted you to know <br>
> that the file factor.cpp from GiNaC is using designated initializers, <br>
> which is only part of c++20... and when I activated c++20 here, the <br>
> linking was broken on windows! So, a solution was to change (around line <br>
> 2344):<br>
> factorization_ctx ctx = {.poly = poly, .x = x, .syms_wox = syms_wox};<br>
> And transform into this:<br>
> factorization_ctx ctx{poly, x, syms_wox};<br>
> <br>
> After that, I can enable c++17 and it works on GCC, Clang and MSVC! For <br>
> GCC and Clang, they don't complain on designated initializers, even if <br>
> it's c++17 standard...<br>
<br>
It is not worth pulling in C++20 for this. We'll change it to a <br>
brace-closed initializer list as you suggest.<br>
<br>
All my best,<br>
-richy.<br>
-- <br>
Richard B. Kreckel<br>
<<a href="https://in.terlu.de/~kreckel/" rel="noreferrer noreferrer" target="_blank">https://in.terlu.de/~kreckel/</a>><br>
<br>
</blockquote></div>