diff --git a/include/experimental/__p0009_bits/extents.hpp b/include/experimental/__p0009_bits/extents.hpp index 760c3da0..6969337e 100644 --- a/include/experimental/__p0009_bits/extents.hpp +++ b/include/experimental/__p0009_bits/extents.hpp @@ -50,14 +50,20 @@ static constexpr std::false_type _check_compatible_extents( std::false_type, std::integer_sequence, std::integer_sequence ) noexcept { return { }; } +// This helper prevents ICE's on MSVC. +template +struct _compare_extent_compatible : std::integral_constant +{}; + template static std::integral_constant< bool, _MDSPAN_FOLD_AND( ( - Extents == dynamic_extent - || OtherExtents == dynamic_extent - || Extents == OtherExtents + _compare_extent_compatible::value ) /* && ... */ ) > diff --git a/include/experimental/__p0009_bits/layout_left.hpp b/include/experimental/__p0009_bits/layout_left.hpp index f723bfcd..a23a905c 100644 --- a/include/experimental/__p0009_bits/layout_left.hpp +++ b/include/experimental/__p0009_bits/layout_left.hpp @@ -163,7 +163,7 @@ class layout_left::mapping { ) _MDSPAN_HOST_DEVICE constexpr index_type operator()(Indices... idxs) const noexcept { - return __compute_offset(__rank_count<0, extents_type::rank()>(), idxs...); + return __compute_offset(__rank_count<0, extents_type::rank()>(), static_cast(idxs)...); } diff --git a/include/experimental/__p0009_bits/layout_right.hpp b/include/experimental/__p0009_bits/layout_right.hpp index 2bd79387..634024af 100644 --- a/include/experimental/__p0009_bits/layout_right.hpp +++ b/include/experimental/__p0009_bits/layout_right.hpp @@ -168,7 +168,7 @@ class layout_right::mapping { ) _MDSPAN_HOST_DEVICE constexpr index_type operator()(Indices... idxs) const noexcept { - return __compute_offset(__rank_count<0, extents_type::rank()>(), idxs...); + return __compute_offset(__rank_count<0, extents_type::rank()>(), static_cast(idxs)...); } MDSPAN_INLINE_FUNCTION static constexpr bool is_always_unique() noexcept { return true; } diff --git a/include/experimental/__p0009_bits/layout_stride.hpp b/include/experimental/__p0009_bits/layout_stride.hpp index 23ae1840..d53b5fe0 100644 --- a/include/experimental/__p0009_bits/layout_stride.hpp +++ b/include/experimental/__p0009_bits/layout_stride.hpp @@ -415,7 +415,7 @@ struct layout_stride { ) MDSPAN_FORCE_INLINE_FUNCTION constexpr index_type operator()(Indices... idxs) const noexcept { - return __impl::_call_op_impl(*this, static_cast(idxs)...); + return static_cast(__impl::_call_op_impl(*this, static_cast(idxs)...)); } MDSPAN_INLINE_FUNCTION static constexpr bool is_always_unique() noexcept { return true; }