Skip to content

Commit

Permalink
Drive-by: address comments from previous PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
JMazurkiewicz committed May 16, 2023
1 parent c17f6a3 commit 8ab95b0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion tests/std/tests/P0009R18_mdspan_layout_right/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ constexpr void check_members(const extents<IndexType, Extents...>& ext, index_se
static_assert(is_nothrow_constructible_v<Mapping2, Mapping>);
// Other tests are defined in 'check_construction_from_other_right_mapping' function
}
#endif
#endif // __clang__

{ // Check construction from layout_left::mapping
using LeftMapping = layout_left::mapping<Ext>;
Expand Down
8 changes: 4 additions & 4 deletions tests/std/tests/P0009R18_mdspan_layout_stride/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -215,23 +215,23 @@ constexpr void check_construction_from_other_mappings() {
}

constexpr void check_required_span_size() {
{ // Check [mdspan.layout.stride.expo]/1.1: Ext::rank() == 0
{ // Check N4950 [mdspan.layout.stride.expo]/1.1: Ext::rank() == 0
using M1 = layout_stride::mapping<extents<int>>;
static_assert(M1{}.required_span_size() == 1);

layout_stride::mapping<extents<int>> m2;
assert(m2.required_span_size() == 1);
}

{ // Check [mdspan.layout.stride.expo]/1.2: size of the multidimensional index space e is 0
{ // Check N4950 [mdspan.layout.stride.expo]/1.2: size of the multidimensional index space e is 0
using M1 = layout_stride::mapping<extents<int, 3, 3, 0, 3>>;
static_assert(M1{}.required_span_size() == 0);

layout_stride::mapping<dextents<int, 4>> m2{dextents<int, 4>{3, 0, 3, 3}, array{1, 3, 1, 1}};
assert(m2.required_span_size() == 0);
}

{ // Check [mdspan.layout.stride.expo]/1.3: final case
{ // Check N4950 [mdspan.layout.stride.expo]/1.3: final case
using M1 = layout_stride::mapping<extents<int, 3, 4, 3>>;
static_assert(M1{}.required_span_size() == 36);

Expand Down Expand Up @@ -345,7 +345,7 @@ constexpr void check_comparisons() {
static_assert(!equality_comparable_with<StaticStrideMapping, layout_stride::mapping<dextents<int, 3>>>);
static_assert(!equality_comparable_with<DynamicStrideMapping, layout_right::mapping<extents<int, 2>>>);
static_assert(!equality_comparable_with<StaticStrideMapping, layout_left::mapping<dextents<int, 1>>>);
// TRANSITION, Check other constraints: [mdspan.layout.stride.obs]/6.1, 6.3
// TRANSITION, Check other constraints: N4950 [mdspan.layout.stride.obs]/6.1, 6.3
}

{ // Check correctness: layout_stride::mapping with layout_stride::mapping
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ void test_construction_from_strided_layout_mapping() {
}

void test_call_operator() {
layout_stride::mapping<extents<unsigned, 5, 3, 4>> m;
layout_stride::mapping<extents<unsigned int, 5, 3, 4>> m;
// Value of extents_type::index-cast(i) must be a multidimensional index in extents_
(void) m(4, 3, 3);
}
Expand Down

0 comments on commit 8ab95b0

Please sign in to comment.