Open mhoemmen opened 6 months ago
Make mdarray CTAD from a possibly multidimensional C array behave as expected.
Example:
float values[5][7][11] {}; mdarray m{values}; static_assert(m.rank() == 3); static_assert(m.static_extent(0) == 5); static_assert(m.static_extent(1) == 7); static_assert(m.static_extent(2) == 11); assert(m.extent(0) == 5); assert(m.extent(1) == 7); assert(m.extent(2) == 11);
This is just a draft, because it uses requires instead of MDSPAN_FUNCTION_REQUIRES. The latter doesn't seem to work like it used to. I really just want to show that this is possible.
requires
MDSPAN_FUNCTION_REQUIRES
Make mdarray CTAD from a possibly multidimensional C array behave as expected.
Example:
This is just a draft, because it uses
requires
instead ofMDSPAN_FUNCTION_REQUIRES
. The latter doesn't seem to work like it used to. I really just want to show that this is possible.