Skip to content

Commit

Permalink
Fix missing restriction on ElementType
Browse files Browse the repository at this point in the history
It needs to be the same as AccessorPolicy::element_type.
  • Loading branch information
pauleonix committed May 21, 2024
1 parent a9c54cc commit 4d5242b
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 4d5242b

Please sign in to comment.