scipopt / soplex

Sequential object-oriented simPlex
Other
59 stars 18 forks source link

Use std::copy to copy arrays #30

Closed jamesjer closed 7 months ago

jamesjer commented 7 months ago

GCC 14 emits this error when building soplex 6.0.4:

In file included from /builddir/build/BUILD/soplex-release-604/src/soplex/nameset.h:35,
                 from /builddir/build/BUILD/soplex-release-604/src/soplex/nameset.cpp:27:
/builddir/build/BUILD/soplex-release-604/src/soplex/datahashtable.h: In member function ‘soplex::DataHashTable<HashItem, Info>& soplex::DataHashTable<HashItem, Info>::operator=(const soplex::DataHashTable<HashItem, Info>&)’:
/builddir/build/BUILD/soplex-release-604/src/soplex/datahashtable.h:361:14: error: invalid array assignment
  361 |       primes = base.primes;
      |       ~~~~~~~^~~~~~~~~~~~~

Use std::copy instead to avoid the error.

leoneifler commented 7 months ago

thank you for this PR. I guess this never led to problems since the hashtable class is barely used. I will of course incorporate your change.

Edit: Since our setup is still not fully on github (migrating from an internal gitlab eventually) I cannot merge your PR. But I cherry-picked it and it will be mirrored here on GitHub tomorrow at the latest.