vtr-verilog-to-routing icon indicating copy to clipboard operation
vtr-verilog-to-routing copied to clipboard

Remove Uses of std::iterator from VTR Libraries

Open AlexandreSinger opened this issue 9 months ago • 7 comments

The std::iterator class will be deprecated in C++17:

  • https://stackoverflow.com/questions/43268146/why-is-stditerator-deprecated

In CI, the GCC 12 and CLANG 14 build show the deprecation warnings. There are other warnings in these builds, but the std::iterator warnings are blocking most of them.

This is fine right now since the CI is currently on Ubuntu 22.04, which comes with GCC 11.4 built-in; however, in the near future we should upgrade the CI to Ubuntu 24.04, which comes with GCC 13.3 built-in. GCC 13 is not even being tested by CI yet, but it will have the same deprecation warnings (if not these features will actually be deprecated).

We should begin to transition the use of std::iterator into their own classes. The process seems to be pretty standard, it would just require some work since some of the uses of std::iterator are in external libraries.

The current users of std::iterator in VTR are:

  • [x] librrgraph/src/base/rr_node_impl.h image
  • [x] librrgraph/src/base/rr_node_types.h image
  • [x] libvtrutil/src/vtr_array_view.h image
  • [x] libvtrutil/src/vtr_ragged_matrix.h image
  • [x] libvtrutil/src/vtr_vector.h image
  • [x] EXTERNAL/libtatum/libtatum/tatum/tags/TimingTags.hpp image
  • [x] EXTERNAL/capnproto/c++/src/capnp/compat/std-iterator.h image
  • [ ] yosys: Yosys contains deprecation warnings for std::iterator which were resolved in recent versions of Yosys. See discussion below.

There may be more, but these were the ones I could find with grep. Once we clear most of these, some other may become more clear from the CI.

AlexandreSinger avatar May 24 '24 02:05 AlexandreSinger