Closed burnpanck closed 8 months ago
There is a single throw in the source in layout_right.hpp: https://github.com/kokkos/mdspan/blob/0e6a69dfe045acbb623003588a4aff844ea4b276/include/experimental/__p0009_bits/layout_right.hpp#L164-L167
throw
layout_right.hpp
This prevents the library from compiling with -fno-exceptions, typical for embedded environments. The comment states that this indeed causes a terminate anyway, it would probably be better to use std::terminate or std::abort directly.
-fno-exceptions
std::terminate
std::abort
Interestingly, the matching throw within layout_left.hpp must have been refactored to that end some time between v0.6.0 and stable: https://github.com/kokkos/mdspan/blob/879869d6740c47d40c02754cc05e241c1c66520f/include/experimental/__p0009_bits/layout_left.hpp#L164-L165
layout_left.hpp
v0.6.0
stable
So this looks like an unfinished refactor to me.
There is a single
throw
in the source inlayout_right.hpp
: https://github.com/kokkos/mdspan/blob/0e6a69dfe045acbb623003588a4aff844ea4b276/include/experimental/__p0009_bits/layout_right.hpp#L164-L167This prevents the library from compiling with
-fno-exceptions
, typical for embedded environments. The comment states that this indeed causes a terminate anyway, it would probably be better to usestd::terminate
orstd::abort
directly.Interestingly, the matching
throw
withinlayout_left.hpp
must have been refactored to that end some time betweenv0.6.0
andstable
: https://github.com/kokkos/mdspan/blob/879869d6740c47d40c02754cc05e241c1c66520f/include/experimental/__p0009_bits/layout_left.hpp#L164-L165So this looks like an unfinished refactor to me.