Files
mp-units/test/runtime
Mateusz Pusz 8fd725bc01 feat: generalize polar/spherical facades to any tuple-like vector rep
The polar_vector/spherical_vector conversion facades were tied to
cartesian_vector. Generalize them to accept and produce any
structured-bindings-compliant vector representation of the matching
dimension that models the exported utility::Vector concept:

- from-vector construction reads the dimension via std::tuple_size and
  the components via structured bindings
- to_cartesian<To>() takes the destination representation as a parameter,
  using parenthesized init and falling back to braced init for
  initializer_list-only reps such as Blaze's StaticVector
- both sides are gated by detail::VectorRepOf<To, N>

Add the tuple protocol (std::tuple_size / std::tuple_element and an
ADL-found get) for fixed-size Eigen vectors in the eigen integration, so
Eigen::Vector2d/Vector3d work directly as a Cartesian representation.
Blaze's StaticVector already ships the protocol, so its integration needs
nothing. Add a per-backend polar_spherical_integration_test exercising
both backends, and a how-to guide section.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-05 23:26:36 +02:00
..