"It is possible that 'long long' types and 'intmax_t' types are not
distinguishable so it sees two overloads that it cannot disambiguate."

This is the problem:

typedef long long intmax_t;
typedef unsigned long long uintmax_t;

Is what going on on VS2012 c++11, x64.

signed long long int seems to be the same as long long, the same for the
unsigned versions.

The GMP signatures for the first two functions are:

void *mpz_set_ui* (mpz_t rop, unsigned long int op)
void *mpz_set_si* (mpz_t rop, signed long int op)

So it comes down to the LP64 vs the LLP64, (long is 32-bit on Win and
64-bit on Lin) I guess some macro's to properly deal with the windows case
and the bitness of the build are in order.

intptr_t and uintptr_t actually model the long type quite nicely!

Cheers,


degski


On 7 August 2013 15:33, Brian Gladman <b...@gladman.plus.com> wrote:

> On 07/08/2013 11:22, Jean-Pierre Flori wrote:
> > It seems that commit a81efe8936cb997d2c0e29fbab0863099898a18d broke the
> C++
> > header, at least with recent version of GCC.
> > It complains about ambiguous overloading of the = operator.
>
> I don't use GCC so I can't debug this - we need a C++ guru who also uses
> C++ to take a look at this.
>
> But I wonder if these lines (around line 1600 in mpirxx.h):
>
> #ifdef MPIRXX_HAVE_LLONG
>   __gmp_expr & operator=(signed long long int i) { mpz_set_si(mp, i);
> return *this; }
>   __gmp_expr & operator=(unsigned long long int i) { mpz_set_ui(mp, i);
> return *this; }
> #endif
> #if defined( _STDINT_H ) || defined ( _STDINT_H_ ) || defined ( _STDINT )
>   __gmp_expr & operator=(intmax_t i) { mpz_set_sx(mp, i); return *this; }
>   __gmp_expr & operator=(uintmax_t i) { mpz_set_ux(mp, i); return *this; }
> #endif
>
> It is possible that 'long long' types and 'intmax_t' types are not
> distinguishable so it sees two overloads that it cannot disambiguate.
>
> It might be worth commenting out one of these declarations to see if
> this fixes the issue.  If it does, we then have to think about a solution.
>
>    Brian
>
>
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "mpir-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mpir-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to mpir-devel@googlegroups.com.
> Visit this group at http://groups.google.com/group/mpir-devel.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>


-- 
Sign the petition:
https://optin.stopwatching.us/<https://optin.stopwatching.us/>

-- 
You received this message because you are subscribed to the Google Groups 
"mpir-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mpir-devel+unsubscr...@googlegroups.com.
To post to this group, send email to mpir-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/mpir-devel.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to