Add C++20 contiguous_range tests for Eigen vectors

Summary

  • Add test coverage verifying that Eigen vectors satisfy std::ranges::contiguous_range and std::contiguous_iterator under C++20
  • Test both fixed-size (Vector4d) and dynamic (VectorXf) vectors
  • Verify std::ranges::find, std::ranges::data, std::ranges::size work correctly
  • Test contiguity of column expressions from column-major matrices
  • Conditionally compiled (#ifdef) — C++17 and earlier builds are unaffected
  • Include <ranges> before main.h to avoid conflict with Eigen's min/max error macros

The contiguous_iterator support itself was added in 392b95bd but had no test coverage.

Test plan

  • stl_iterators test passes with both C++17 (ranges tests skipped) and C++20 (ranges tests run) using GCC 13

Closes #2396 (closed)

Merge request reports

Loading