-
Notifications
You must be signed in to change notification settings - Fork 1.6k
<mdspan>: Improve debug checks
#3821
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
Merged
StephanTLavavej
merged 29 commits into
microsoft:feature/mdspan2
from
JMazurkiewicz:mdspan/debug-guards
Jul 3, 2023
Merged
<mdspan>: Improve debug checks
#3821
StephanTLavavej
merged 29 commits into
microsoft:feature/mdspan2
from
JMazurkiewicz:mdspan/debug-guards
Jul 3, 2023
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…atic_multidim_index_space_size_representable`
…econdition check
…recondition check
…uctor's preconditions
This comment was marked as resolved.
This comment was marked as resolved.
Drive-by: * Remove unnecessary `[[maybe_unused]]` attributes * Simplify calls to `check_members_with_various_extents`
This comment was marked as resolved.
This comment was marked as resolved.
…nsform` in `get_mapping_properties`
Previously, non-unique exhaustive mappings were rejected.
StephanTLavavej
approved these changes
Jul 3, 2023
| constexpr array<int, 256> some_ints{}; | ||
|
|
||
| void test_construction_from_other_mdspan() { | ||
| auto mds1 = mdspan{some_ints.data(), 8, 2, 8}; |
Member
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an occurrence of "almost always auto" which we conventionally avoid. mdspan mds1{some_ints.data(), 8, 2, 8}; is the preferred form.
Occurs below.
Member
|
Thank you! I have minor comments for followup but nothing that prevented a merge. |
JMazurkiewicz
added a commit
to JMazurkiewicz/STL
that referenced
this pull request
Jul 5, 2023
JMazurkiewicz
added a commit
to JMazurkiewicz/STL
that referenced
this pull request
Jul 5, 2023
JMazurkiewicz
added a commit
to JMazurkiewicz/STL
that referenced
this pull request
Jul 5, 2023
JMazurkiewicz
added a commit
to JMazurkiewicz/STL
that referenced
this pull request
Jul 5, 2023
Addresses microsoft#3821 (comment)
JMazurkiewicz
added a commit
to JMazurkiewicz/STL
that referenced
this pull request
Jul 7, 2023
JMazurkiewicz
added a commit
to JMazurkiewicz/STL
that referenced
this pull request
Jul 7, 2023
JMazurkiewicz
added a commit
to JMazurkiewicz/STL
that referenced
this pull request
Jul 7, 2023
JMazurkiewicz
added a commit
to JMazurkiewicz/STL
that referenced
this pull request
Jul 7, 2023
Addresses microsoft#3821 (comment)
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#if _CONTAINER_DEBUG_LEVEL > 0(addresses<mdspan>: Completely reworkstd::extents#3586 (comment)),extents:_Static_extentsarray public and use it when possible,_Multidim_index_space_size_is_always_zerostatic member variable,_Is_index_space_size_representableinto two functions:_Is_static_multidim_index_space_size_representableand_Is_dynamic_multidim_index_space_size_representable,extents(_OtherIndexTypes... _Exts)constructor,layout_(left|right|stride)forloops (layout_(left|right)'s constructors fromlayout_stride),operator()to corresponding_Index_implfunctions (to avoid casting_Indicestoindex_typetwice),[[maybe_unused]]attributes in tests,check_members_with_various_extentsin tests,ranges::adjacent_findinstead ofviews::pairwise_transforminget_mapping_propertiesfunction,get_mapping_properties- previously, non-unique exhaustive mappings were recognized as non-exhaustive,mdspan:extents_type::static_extentinmdspan::static_extentand add precondition check,mdspan::empty,