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 a few small bugs in submdspan #6621
base: main
Are you sure you want to change the base?
Conversation
@@ -21741,11 +21741,11 @@ | |||
\begin{itemdescr} | |||
\pnum | |||
\constraints | |||
\tcode{sizeof...(slices)} equals \tcode{Extents::rank()}. | |||
\tcode{sizeof...(slices)} equals \tcode{decltype(src)::rank()}. |
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.
decltype(src) is
const extents<IndexType, Extents...>&and reference types don't have members, so this is ill-formed.
src.rank()would work here, as would
extents<IndexType, Extents...>::rank()`. (I think the latter is more conventional for the Standard Library, though I have no data to back that up nor strong feelings either way.)
\hphantom{0 } \le \tcode{extents().extent($k$)}$ | ||
$0 \le \tcode{\exposid{first_}<index_type, $k$>(slices...)}$ | ||
$\le \tcode{\exposid{last_}<$k$>(extents(), slices...)}$ | ||
$\le \tcode{extents().extent($k$)}$ |
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.
FWIW, I didn't read this before as comparing each expression to 0
, but as chained comparisons as you intend. In either case, you this line is now overlong and needs to be broken manually (hence the CI failure).
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.
Is there a reason you're changing the linebreaking here? Is there non-whitespace change here that you want to make?
Please get in touch and we can figure this out. |
This fixes a couple bugs in
subdmspan
. Some of the wording for constraints/mandates/preconditions ofsubmdspan_extents
was straight copied fromsubmdspan_mapping
but the names of the things it refers to are not quite right (src
is actually the equivalent ofextents()
anddecltype(src)
the equivalent ofExtents
). Also fixes the last precondition insubmdspan_mapping
which should be essentially the same as insubmdspan_extents
i.e. a strict ordering of the values, not comparing to 0 each of them.