Thanks Bob and Alexander, I think I start to understand.

grep digits ../../src/totp/totp.cpp
[...]
quint8 digits = encoder.digits == 0 ? numDigits : encoder.digits;
[...]

From my 30 years old rusty knowledge of C++, this mean that digits is supposed to be a 'quint8' which is most probably QT version of the 'int' and as Bob noticed the pow function expects 'int', 'float', or 'double'

From Alexander reference, I should have
quint32 digitsPower = pow(encoder.alphabet.size(), int(digits));

In that particular case it was 'encoder.alphabet.size()' which appeared ambiguous, using 'double (encoder.alphabet.size())' made it. 'digits' was ok so far

Bottom line is I could compile and execute it, it is nice to have it native (works with wine).

Thanks both of you.
Best regards.
Ben

On 04/12/2018 03:21, Bob Friesenhahn wrote:

On Mon, 3 Dec 2018, [email protected] wrote:

Hello,
'static QString Totp::generateTotp(QByteArray, quint64, quint8, quint8)': /home/ben/tmp/keepassxc-2.3.4/src/totp/totp.cpp:167:62: error: call of overloaded 'pow(int, quint8&)' is ambiguous
quint32 digitsPower = pow(encoder.alphabet.size(), digits);

What is the declared storage type of the 'digits' argument? From reading the header, it appears that it must be of type 'int', 'float', or 'double'. Any other type would require a type transformation which might be ambiguous.

Bob

_______________________________________________
openindiana-discuss mailing list
[email protected]
https://openindiana.org/mailman/listinfo/openindiana-discuss

Reply via email to