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

<mdspan>: Completely rework std::extents #3586

Merged

Conversation

JMazurkiewicz
Copy link
Contributor

@JMazurkiewicz JMazurkiewicz commented Mar 23, 2023

Changes to std::extents:

  • Get rid of _Mdspan_extent_type base type,
  • Prefer named functions instead of internal names (e.g. sizeof...(_Extents) -> rank(), _Static_extents[_Idx] -> static_extent(_Idx)),
  • Fix _EXPORT_STD placement (only for extents and dextents),
  • Implement preconditions:
    • Those preconditions are unconditional for now (Should I guard them with _CONTAINER_DEBUG_LEVEL macro?),
    • Some preconditions are checked only if type of inspected value satisfies integral,
    • Preconditions use std::cmp_ functions from C++20 to avoid signed/unsigned comparison warnings,
    • Add _death tests,
  • Reimplement deduction guide with workaround for not-yet reported MSVC ICE,
  • Reimplement dextents - get rid of IILE,
  • Fix some bugs and enable previously failing tests added by <mdspan>: Add separate tests for extents and default_accessor #3580,
  • Fix some tests from old suite,
  • Remove dead code - _Fill_extents function.

@JMazurkiewicz JMazurkiewicz requested a review from a team as a code owner March 23, 2023 16:38
@StephanTLavavej StephanTLavavej added the mdspan C++23 mdspan label Mar 24, 2023
@cpplearner

This comment was marked as resolved.

@StephanTLavavej StephanTLavavej self-assigned this Mar 24, 2023
@JMazurkiewicz JMazurkiewicz marked this pull request as draft March 24, 2023 09:51
@JMazurkiewicz

This comment was marked as outdated.

@JMazurkiewicz JMazurkiewicz marked this pull request as ready for review March 24, 2023 10:53
@JMazurkiewicz

This comment was marked as resolved.

tests/std/tests/P0009R18_mdspan/test.cpp Show resolved Hide resolved
stl/inc/mdspan Show resolved Hide resolved
stl/inc/mdspan Show resolved Hide resolved
stl/inc/mdspan Show resolved Hide resolved
stl/inc/mdspan Show resolved Hide resolved
@StephanTLavavej
Copy link
Member

Thanks! I have some comments for followup but I think we can go ahead and merge this now. I'll also merge with main in a PR after this.

@StephanTLavavej StephanTLavavej merged commit b0a6a97 into microsoft:feature/mdspan2 Mar 24, 2023
@JMazurkiewicz JMazurkiewicz deleted the mdspan/rework-extents branch March 24, 2023 22:31
JMazurkiewicz added a commit to JMazurkiewicz/STL that referenced this pull request Mar 25, 2023
JMazurkiewicz added a commit to JMazurkiewicz/STL that referenced this pull request Mar 25, 2023
JMazurkiewicz added a commit to JMazurkiewicz/STL that referenced this pull request Mar 25, 2023
JMazurkiewicz added a commit to JMazurkiewicz/STL that referenced this pull request Mar 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mdspan C++23 mdspan
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants