tommath.h and boost\multiprecision\tommath.hpp
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
On Wednesday, February 28th, 2024 at 9:21 AM, Helmut Zeisel via Boost-users
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
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 _______________________________________________
Helmut, I opened your issue against the library here: https://github.com/boostorg/multiprecision/issues/602. I have Tommath v1.2.1 installed on my system (MacOS ARM64) which has: mp_err mp_radix_size(const mp_int *a, int radix, int *size) MP_WUR; Maybe a new change on develop? If you have a minimal reproducer for your issue that would help as well. Thanks. Matt
Gesendet: Mittwoch, 28. Februar 2024 um 11:01 Uhr
Von: "Matt Borland"
If you have a minimal reproducer for your issue that would help as well. Thanks.
The "minimal reproducer" is really minimal:
===================================================
#include
Gesendet: Mittwoch, 28. Februar 2024 um 11:01 Uhr
Von: "Matt Borland"
I have Tommath v1.2.1 installed on my system (MacOS ARM64) which has ...
Now I also switched to v1.2.1 instead of the developer branch and this actually also solved my problem. Thank you, Helmut
participants (2)
-
Helmut Zeisel
-
Matt Borland