linbox-team / fflas-ffpack

FFLAS-FFPACK - Finite Field Linear Algebra Subroutines / Package
http://linbox-team.github.io/fflas-ffpack/
GNU Lesser General Public License v2.1
57 stars 23 forks source link

error: ambiguous overload for ‘operator<’ #335

Closed d-torrance closed 3 years ago

d-torrance commented 3 years ago

It looks like 27349f5 introduced a new error:

g++ -DHAVE_CONFIG_H -I. -I..  -I.. -Wdate-time -D_FORTIFY_SOURCE=2 -O2 -Wall -DNDEBUG -UDEBUG   -fopenmp  -g -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o test-fgemm.o test-fgemm.C
In file included from test-fgemm.C:52:
../fflas-ffpack/utils/test-utils.h: In instantiation of ‘Field* FFPACK::chooseField(Givaro::Integer, uint64_t, uint64_t) [with Field = Givaro::Modular<RecInt::rint<7> >; uint64_t = long unsigned int]’:
test-fgemm.C:292:37:   required from ‘bool run_with_field(Givaro::Integer, uint64_t, int, int, int, int, size_t, bool, size_t) [with Field = Givaro::Modular<RecInt::rint<7> >; uint64_t = long unsigned int; size_t = long unsigned int]’
test-fgemm.C:411:101:   required from here
../fflas-ffpack/utils/test-utils.h:78:24: error: ambiguous overload for ‘operator<’ (operand types are ‘Givaro::Integer’ and ‘Givaro::Modular<RecInt::rint<7> >::Residu_t’ {aka ‘RecInt::rint<7>’})
   78 |             } while (p <FFLAS::minCardinality<Field>() || (maxV>0 && p > maxV));
      |                      ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/gmp++/gmp++.h:57,
                 from /usr/include/givaro/givinteger.h:19,
                 from ../fflas-ffpack/utils/fflas_memory.h:42,
                 from ../fflas-ffpack/fflas/fflas.h:69,
                 from ../fflas-ffpack/utils/fflas_io.h:49,
                 from test-fgemm.C:39:
/usr/include/gmp++/gmp++_int.h:480:33: note: candidate: ‘int32_t Givaro::Integer::operator<(const Givaro::Integer&) const’
  480 |         giv_all_inlined int32_t operator < (const Integer & l) const;
      |                                 ^~~~~~~~
/usr/include/gmp++/gmp++_int.h:482:33: note: candidate: ‘int32_t Givaro::Integer::operator<(int32_t) const’
  482 |         giv_all_inlined int32_t operator < (const int32_t l) const;
      |                                 ^~~~~~~~

Here is the full build log: https://launchpadlibrarian.net/529564847/buildlog_ubuntu-focal-amd64.fflas-ffpack_2.4.3.26.g2b0d1469-0ppa1~ubuntu20.04.1_BUILDING.txt.gz

ClementPernet commented 3 years ago

My bad, this is now fixed in 05443b2