Hi Brian, It does fail for me though:
Z:\VC\x64\include\mpirxx.h(1596): error : invalid redeclaration of member function "__gmp_expr<mpz_t, mpz_t>::__gmp_expr(__int64)" (declared at line 1590) __gmp_expr(intmax_t l) { mpz_init_set_sx(mp, l); } ^ Z:\VC\x64\include\mpirxx.h(1597): error : invalid redeclaration of member function "__gmp_expr<mpz_t, mpz_t>::__gmp_expr(unsigned __int64)" (declared at line 1591) __gmp_expr(uintmax_t l) { mpz_init_set_ux(mp, l); } ^ This already happens when just including the header mpirxx.h in a project (VS2012/release/x64). Cheers, degski. On 8 August 2013 16:06, Brian Gladman <b...@gladman.plus.com> wrote: > On 08/08/2013 13:43, Bill Hart wrote: > > On 8 August 2013 12:53, Brian Gladman <b...@gladman.plus.com> wrote: > > [snip] > >> where mpir_ui/si map to long types everywhere except on Windows x64 > >> where they map to long long types. > >> > >>> 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. > >> > >> I don't understand this - can you elaborate please. > > > > He's just referring to the fact that on 64 bit linux long is 64 bits, > > whereas on Windows it's 32 bits. So he's recommending that we fix the > > problem with some macros which distinguish whether we are on Windows or > > not, and whether the machine is 32 bits or 64 bits. > > > > I guess we were already doing this, but we got it wrong somewhere. > > Specifically, you cannot overload a function for intmax_t and long long > > because they are the same type. > > We provide overloads for both signed and unsigned long and long long > types. At the moment we also provide overloads for uintmax_t and > intmax_t types. > > Since this overload ought to fail on both Linux (ambiguity with long) > and Windows x64 (ambiguity with long long) we could simply remove it. > > But it doesn't fail on Windows x64 (unless the tests don't detect it) so > it seems that we can add an _MSC_VER based exclude to fix this. But it > would be nice to understand why it fails on GCC but not on Visual Studio > - probably some different algorithm for disambiguation maybe. > > 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.