Add C++20 contiguous_range tests for Eigen vectors
Summary
- Add test coverage verifying that Eigen vectors satisfy
std::ranges::contiguous_rangeandstd::contiguous_iteratorunder C++20 - Test both fixed-size (
Vector4d) and dynamic (VectorXf) vectors - Verify
std::ranges::find,std::ranges::data,std::ranges::sizework correctly - Test contiguity of column expressions from column-major matrices
- Conditionally compiled (
#ifdef) — C++17 and earlier builds are unaffected - Include
<ranges>beforemain.hto 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_iteratorstest passes with both C++17 (ranges tests skipped) and C++20 (ranges tests run) using GCC 13
Closes #2396 (closed)