Skip to content

Commit

Permalink
Merge pull request #332 from pauleonix/element-type-restriction
Browse files Browse the repository at this point in the history
Fix missing restriction on ElementType
  • Loading branch information
dalg24 authored May 21, 2024
2 parents a9c54cc + 4d5242b commit df6d31b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/experimental/__p0009_bits/mdspan.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ class mdspan
private:
static_assert(detail::__is_extents_v<Extents>,
MDSPAN_IMPL_STANDARD_NAMESPACE_STRING "::mdspan's Extents template parameter must be a specialization of " MDSPAN_IMPL_STANDARD_NAMESPACE_STRING "::extents.");
static_assert(std::is_same<ElementType, typename AccessorPolicy::element_type>::value,
MDSPAN_IMPL_STANDARD_NAMESPACE_STRING "::mdspan's ElementType template parameter must be the same as its AccessorPolicy::element_type.");

// Workaround for non-deducibility of the index sequence template parameter if it's given at the top level
template <class>
Expand Down

0 comments on commit df6d31b

Please sign in to comment.