diff --git a/test/unit/mem/concepts.cpp b/test/unit/mem/concepts.cpp index c243df08..d4e32f1f 100644 --- a/test/unit/mem/concepts.cpp +++ b/test/unit/mem/concepts.cpp @@ -216,14 +216,16 @@ TEST_CASE( "test return value type of the access operator for alpaka::concepts::IDataSource and IMdSpan", "[mem][concept]") { - // the test is motivate by creating a MdSpan> + // This regression test models element types such as std::atomic: + // access must still work by reference even when the element type is not copyable. + // The pitch vector has to be computed from the same element type used by MdSpan. NonCopyStruct mcs; STATIC_REQUIRE_FALSE(std::convertible_to); STATIC_REQUIRE(std::convertible_to); concepts::Vector auto const extents = Vec{1u}; - concepts::Vector auto const pitches = alpaka::calculatePitchesFromExtents(extents); + concepts::Vector auto const pitches = alpaka::calculatePitchesFromExtents(extents); alpaka::MdSpan mdspan(&mcs, extents, pitches);