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

Msvc layout stride fixes #306

Merged
merged 2 commits into from
Jan 4, 2024
Merged

Msvc layout stride fixes #306

merged 2 commits into from
Jan 4, 2024

Conversation

crtrott
Copy link
Member

@crtrott crtrott commented Jan 4, 2024

No description provided.

@@ -88,7 +88,7 @@ struct layout_stride {
: private detail::__no_unique_address_emulation<
detail::__compressed_pair<
Extents,
std::array<typename Extents::index_type, Extents::rank()>
detail::possibly_empty_array<typename Extents::index_type, Extents::rank()>
Copy link
Member Author

Choose a reason for hiding this comment

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

see below: the base_t typedef was already using possibly_empty_array. This needed to change, because std::array is not actually empty for rank == 0

@@ -231,7 +231,7 @@ static_assert(_MDSPAN_CPLUSPLUS >= MDSPAN_CXX_STD_14, "mdspan requires C++14 or
#endif

#ifndef MDSPAN_CONDITIONAL_EXPLICIT
# if MDSPAN_HAS_CXX_20 && !defined(_MDSPAN_COMPILER_MSVC)
Copy link
Member Author

Choose a reason for hiding this comment

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

effectively this impacted some tests which didn't guard the convertibility tests correctly for C++20 & MSVC. But with current MSVC this just works anyway.

@mhoemmen mhoemmen self-requested a review January 4, 2024 19:51
Copy link
Contributor

@mhoemmen mhoemmen left a comment

Choose a reason for hiding this comment

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

EXCELLENT

@dalg24 dalg24 merged commit 0af9208 into stable Jan 4, 2024
20 checks passed
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.

3 participants