Skip to content

GCC 14: No match for operator= for Givaro::ZRing<Givaro::Integer> #226

@musicinmybrain

Description

@musicinmybrain

When compiling givaro with GCC 14.0.1 (as now packaged in Fedora Rawhide, the development version of Fedora Linux), I see the following regression:

givaro/givaro/givaro/random-integer.h: In member function 'Givaro::RandomIntegerIterator<_Unsigned, _Exact_Size>& Givaro::RandomIntegerIterator<_Unsigned, _Exact_Size>::operator=(const Givaro::RandomIntegerIterator<_Unsigned, _Exact_Size>&)':
givaro/givaro/givaro/random-integer.h:90:54: error: no match for 'operator=' (operand types are 'Givaro::RandomIntegerIterator<_Unsigned, _Exact_Size>::Integer_Domain' {aka 'Givaro::ZRing<Givaro::Integer>'} and 'const Givaro::RandomIntegerIterator<_Unsigned, _Exact_Size>::Integer_Domain' {aka 'const Givaro::ZRing<Givaro::Integer>'})
   90 |                 const_cast<Integer_Domain&>(_ring)=R._ring;
      |                                                      ^~~~~

I initially observed this with givaro 4.2.0, but I can also reproduce it with current master, a6b3708.

I would be happy to offer a PR, but I haven’t figured out what the correct fix is.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions