lsils / mockturtle

C++ logic network library
MIT License
191 stars 133 forks source link

incorrect assignment operation for a const vector #642

Closed Fuuulkrum7 closed 2 months ago

Fuuulkrum7 commented 2 months ago

Problem description In file binding_view.hpp, located in folder include/mockturtle/views, in line 116, operator= is overloaded, within which, in line 119, a new value is assigned to the constant vector "std::vector const _library". This action causes a compilation error. If the vector type is changed from "std::vector const _library" to "std::vector _library", compilation succeeds.

To Reproduce Just start compliation with last version of gcc. Earlier I've used gcc version 13.2 on Fedora 39, and recently updated to Fedora 40, which comes with gcc 14.1, and when trying to compile the project with the appropriate version of the compiler, I received the error described earlier: mockturtle/include/mockturtle/views/binding_view.hpp:119:28: error: no match for «operator=» (operand types are «const std::vector» and «const std::vector») 119 | _library = binding_ntk._library;

Environment

Check list [ ] I have tried to run in DEBUG mode and there was no assertion failure (or the reported bug is an assertion failure). [ ] I have made sure that the provided code compiles and the testcase reproduces the error. [ ] I have minimized the testcase.

aletempiac commented 2 months ago

Thank you for reporting, the bug has been fixed! Best, Alessandro