Open mhoemmen opened 6 years ago
Retitled after consultation with @dsunder .
Notes:
std::is_move_constructible_v
. We very definitely should not strike the move constructor from extents. I can't think of any analog in the standard for this sort of thing; can anyone else? If this happened, you could have one implementation where std::swap(ex1, ex2)
works fine, and then in another implementation it doesn't even compile. That's not how standards work, AFAICT.this->extent(r)
would be inconsistent with how all of the rest of the standard does things. See, e.g., span
. We just want extent(r)
there. (Oh, just got to the point where GR withdrew this comment, never mind)is_convertible_v
should be the same across implementations.dynamic_extents_
is a std::array
, value-initialization doesn't do what you want for built-in types. This should be aggregate-initializes.More comments to come...
More notes:
dynamic_extents...
ctor. I'm pretty sure I did my homework on these, so if I'm wrong I'd like to see more than a passing comment as to why I'm wrong.rank_dynamic() != 0
constraint on the dynamic_extents...
constructor is unnecessary, since the is_convertible_v
fold expression will be false
in that case.std::array
constructor from the fact that somehow we ended up with a deduced rank_dynamic
template parameter. rank_dynamic
should have been non-deduced and fixed to the valuerank_dynamic()
, just as in the exposition-only parameter. I don't know if this was my typo or got added later, but hopefully this clears things up.More:
rank_dynamic()
in the type of the exposition only member—if it helps, I tried all of the alternatives discussed in the notes, and ended up with this one (I guess I didn't test MSVC...); seems like the room settled on the same thing?On layout:
i...
to e
. Every other way I tried to do this was less clear. We can't just strike this unless that is made clear elsewhere.Pending #90 changes w/ @hcedwar .
Per request by @hcedwar, I'm posting the link to the minutes from Saturday LWG small group P0009R8 (mdspan): http://wiki.edg.com/bin/view/Wg21sandiego2018/SanDiego2018P0009