Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing restriction on ElementType #332

Merged
merged 1 commit into from
May 21, 2024

Conversation

pauleonix
Copy link
Contributor

Closes #330

It needs to be the same as AccessorPolicy::element_type.

I used plain std::is_same<T, U>::value because std::is_same_v<T, U> is a C++17 feature and the code should be compatible with C++14.

It needs to be the same as AccessorPolicy::element_type.
Copy link
Member

@dalg24 dalg24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

For reference this is indeed listed as a mandate https://eel.is/c++draft/mdspan.mdspan#overview-2.3

edit and now I see that you referred to that clause in your bug report :)

@dalg24 dalg24 merged commit df6d31b into kokkos:stable May 21, 2024
10 checks passed
@mhoemmen
Copy link
Contributor

mhoemmen commented May 21, 2024

@pauleonix Delightful! Thanks for the fix! and thanks @dalg24 for the review!

@pauleonix pauleonix deleted the element-type-restriction branch May 21, 2024 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing restriction on ElementType and AccessorPolicy​::​element_type being the same
3 participants