Skip to content

Commit

Permalink
Make test for dims C++14 compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
crtrott committed May 2, 2024
1 parent d0e8312 commit ffe7c27
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/test_dims.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,18 @@ template<std::size_t Rank>
void test_dims_with_one_template_argument()
{
using d = MDSPAN_IMPL_STANDARD_NAMESPACE :: MDSPAN_IMPL_PROPOSED_NAMESPACE :: dims<Rank>;
static_assert(test::is_extents_v<d>);
static_assert(std::is_same_v<typename d::index_type, std::size_t>);
static_assert(d::rank() == Rank);
static_assert(test::is_extents_v<d>, "dims<Rank> is not an extents specialization");
static_assert(std::is_same<typename d::index_type, std::size_t>::value, "dims::index_type is wrong");
static_assert(d::rank() == Rank, "dims::rank() is wrong");
}

template<std::size_t Rank, class ExpectedIndexType>
void test_dims_with_two_template_arguments()
{
using d = MDSPAN_IMPL_STANDARD_NAMESPACE :: MDSPAN_IMPL_PROPOSED_NAMESPACE :: dims<Rank, ExpectedIndexType>;
static_assert(test::is_extents_v<d>);
static_assert(std::is_same_v<typename d::index_type, ExpectedIndexType>);
static_assert(d::rank() == Rank);
static_assert(test::is_extents_v<d>, "dims<Rank,T> is not an extents specialization");
static_assert(std::is_same<typename d::index_type, ExpectedIndexType>::value, "dims::index_type is wrong");
static_assert(d::rank() == Rank, "dims::rank() is wrong");
}

} // namespace test
Expand Down

0 comments on commit ffe7c27

Please sign in to comment.