[GiNaC-devel] CLN and GiNaC patches for Win64 build

Jan Rheinländer jrheinlaender at gmx.de
Sun Jul 1 17:00:12 CEST 2018


Hi,

the patch is on

https://github.com/jrheinlaender/ginac/commit/d87445c0eaa27669f82bea19bb69933c3e66b9a1


Am 04.05.2018 um 23:38 schrieb Richard B. Kreckel:
> On 05/02/2018 08:22 PM, Jan Rheinländer wrote:
>> here's what the compiler says (sorry my system is German):
>>
>> factor.cpp(2254): error C2440: "Initialisierung": "std::size_t" kann
>> nicht in "GiNaC::numeric" konvertiert werden
>> factor.cpp(2254): note: Quelltyp konnte von keinem Konstruktor
>> angenommen werden, oder die Überladungsauflösung des Konstruktors ist
>> mehrdeutig
>>
>> The code in line 2254 is:
>>
>> numeric modulus = (vnlst.nops() > 3) ? vnlst.nops() : 3;
>>
>> It initializes a numeric from the return value of nops(), which is size_t.
> So on Windos, where unsigned int is the same as unsigned long, the two
> existing overloads of numeric ctor are ambiguous. Bummer.
>
> It's better to convert these prototypes to uint32_t, uint64_t from
> <cstdint> than add more overloads for size_t. This way, we need to
> maintain two overloads, rather than three.
>
>   -richy.
> _______________________________________________
> GiNaC-devel mailing list
> GiNaC-devel at ginac.de
> https://www.cebix.net/mailman/listinfo/ginac-devel




More information about the GiNaC-devel mailing list