Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mp_radix_size pointer type incorrect in some versions of tommath #602

Closed
mborland opened this issue Feb 28, 2024 · 1 comment · Fixed by #603
Closed

mp_radix_size pointer type incorrect in some versions of tommath #602

mborland opened this issue Feb 28, 2024 · 1 comment · Fixed by #603

Comments

@mborland
Copy link
Member

From the users ML:

I tried to use boost muiltiprecision with Visual Studio 2022, 64 bit and got the following error message:

boost\multiprecision\tommath.hpp(444,36): error C2664: 'mp_err mp_radix_size(const mp_int *,int,size_t *)': cannot convert argument 3 from 'int *' to 'size_t *'

I used tommath.h from

https://github.com/libtom/libtommath/blob/develop/tommath.h

that has (line 583)

  mp_err mp_radix_size(const mp_int *a, int radix, size_t *size) MP_WUR;

but boost\multiprecision\tommath.hpp, lineS 443/444 are

  int s;
  detail::check_tommath_result(mp_radix_size(const_cast< ::mp_int*>(&m_data), base, &s));

I compared with cygwin, there tommath.h is

  mp_err mp_radix_size(const mp_int *a, int radix, int *size) MP_WUR;

So I am not sure: do I need some different tommath for Visual Studio 2022, 64 bit, or should boost\multiprecision\tommath.hpp be changed?

Helmut

@mborland
Copy link
Member Author

mborland commented Feb 28, 2024

Change was made: libtom/libtommath@a29aa59

Which years ago, but doesn't seem to have ever made release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant