@@ -28,22 +28,16 @@ submdspan(const mdspan<ElementType, Extents, LayoutPolicy, AccessorPolicy> &src,
2828 SliceSpecifiers... slices) {
2929
3030#if defined(MDSPAN_ENABLE_P3663)
31- [[maybe_unused]] auto [...canonical_slices ] = submdspan_canonicalize_slices (src.extents (), slices...);
31+ auto [...canonical_slices ] = submdspan_canonicalize_slices (src.extents (), slices...);
3232 static_assert (sizeof ...(canonical_slices) == sizeof ...(slices));
33- [[maybe_unused]] auto sub_map_result = submdspan_mapping (src.mapping (), canonical_slices...);
34-
35- #if 0
3633 // TODO FIX IN PROPOSAL: [canonical_]slices (incorrect formatting).
3734 auto sub_map_result = submdspan_mapping (src.mapping (), canonical_slices...);
3835 // TODO FIX IN PROPOSAL: It's src.data_handle(), not src.data().
3936 // Missing "typename" before AccessorPolicy::offset_policy.
4037 return mdspan (src.accessor ().offset (src.data_handle (), sub_map_result.offset ),
4138 sub_map_result.mapping ,
4239 typename AccessorPolicy::offset_policy (src.accessor ()));
43- #endif // 0
44- #endif
45-
46- // #else
40+ #else
4741 const auto sub_submdspan_mapping_result = submdspan_mapping (src.mapping (), slices...);
4842 // NVCC has a problem with the deduction so lets figure out the type
4943 using sub_mapping_t = std::remove_cv_t <decltype (sub_submdspan_mapping_result.mapping )>;
@@ -54,6 +48,6 @@ submdspan(const mdspan<ElementType, Extents, LayoutPolicy, AccessorPolicy> &src,
5448 src.accessor ().offset (src.data_handle (), sub_submdspan_mapping_result.offset ),
5549 sub_submdspan_mapping_result.mapping ,
5650 sub_accessor_t (src.accessor ()));
57- // #endif
51+ #endif
5852}
5953} // namespace MDSPAN_IMPL_STANDARD_NAMESPACE
0 commit comments