Skip to content

Commit 02d3694

Browse files
committed
IT WORKS
Fix extent computation for std::complex. It builds and passes tests. NEXT STEPS: * Re-test non-P3663 version * Make it ill-formed to call submdspan_mapping with non-canonical slice types * Make P3663 version only use constant_wrapper and canonical slice types in submdspan_mapping_impl functions
1 parent a336fb0 commit 02d3694

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/experimental/__p2630_bits/submdspan_extents.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -896,7 +896,7 @@ submdspan_canonicalize_one_slice(const extents<IndexType, Extents...>& exts, Sli
896896
else if constexpr (detail::is_std_complex<Slice>) {
897897
return strided_slice{
898898
.offset = canonical_ice<IndexType>(s.real()),
899-
.extent = canonical_ice<IndexType>(s.imag()),
899+
.extent = canonical_ice<IndexType>(s.imag() - s.real()),
900900
.stride = std::cw<IndexType(1)>
901901
};
902902
}

0 commit comments

Comments
 (0)