From 90ed2f9ef5f2757ac2abc335572e473a442f9f49 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Sun, 12 Mar 2023 14:26:30 -0700 Subject: [PATCH 1/3] Drop `_STD` qualification for `make_index_sequence`. --- stl/inc/mdspan | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stl/inc/mdspan b/stl/inc/mdspan index ba2207ff253..dfb18f53281 100644 --- a/stl/inc/mdspan +++ b/stl/inc/mdspan @@ -186,14 +186,14 @@ public: && is_nothrow_constructible_v && (_Size == rank_dynamic() || _Size == rank()) constexpr explicit(_Size != rank_dynamic()) extents(span<_OtherIndexType, _Size> _Exts) noexcept - : _Mybase{_Exts, _STD make_index_sequence{}} {} + : _Mybase{_Exts, make_index_sequence{}} {} template requires is_convertible_v && is_nothrow_constructible_v && (_Size == rank_dynamic() || _Size == rank()) constexpr explicit(_Size != rank_dynamic()) extents(const array<_OtherIndexType, _Size>& _Exts) noexcept - : _Mybase{span{_Exts}, _STD make_index_sequence{}} {} + : _Mybase{span{_Exts}, make_index_sequence{}} {} template _NODISCARD_FRIEND constexpr bool operator==( From 1319ced3085dc4461aae5ed02afff8c7cbc2baa7 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Sun, 12 Mar 2023 14:29:31 -0700 Subject: [PATCH 2/3] Remove dead `_Multiply()`. Also, `_X` and `_Y` were macro-like. --- stl/inc/mdspan | 4 ---- 1 file changed, 4 deletions(-) diff --git a/stl/inc/mdspan b/stl/inc/mdspan index dfb18f53281..31c7e14f94c 100644 --- a/stl/inc/mdspan +++ b/stl/inc/mdspan @@ -494,10 +494,6 @@ public: private: _Extents _Myext{}; - static constexpr size_t _Multiply(size_t _X, size_t _Y) { - return _X * _Y; - } - template constexpr index_type _Index_impl(_IndexType... _Idx, index_sequence<_Seq...>) const noexcept { index_type _Result = 0; From 97db641a2c17ad7bb66bb6312a97b04a8f7c4012 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Sun, 12 Mar 2023 14:46:16 -0700 Subject: [PATCH 3/3] All shall love `_EXPORT_STD` and despair. --- stl/inc/mdspan | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/stl/inc/mdspan b/stl/inc/mdspan index 31c7e14f94c..669ba378eca 100644 --- a/stl/inc/mdspan +++ b/stl/inc/mdspan @@ -117,6 +117,7 @@ struct _Mdspan_extent_type<_IndexType, 0> { } }; +_EXPORT_STD template class extents : private _Mdspan_extent_type<_IndexType, ((_Extents == dynamic_extent) + ... + 0), _Extents...> { public: @@ -231,6 +232,7 @@ public: } }; +_EXPORT_STD template using dextents = decltype([](const _IndexType2, const index_sequence<_Seq...>) constexpr { @@ -267,16 +269,19 @@ template inline constexpr bool _Is_mapping_of = is_same_v, _Mapping>; +_EXPORT_STD struct layout_left { template class mapping; }; +_EXPORT_STD struct layout_right { template class mapping; }; +_EXPORT_STD struct layout_stride { template class mapping; @@ -681,6 +686,7 @@ private: } }; +_EXPORT_STD template struct default_accessor { using offset_policy = default_accessor; @@ -705,6 +711,7 @@ struct default_accessor { } }; +_EXPORT_STD template > class mdspan {