cpp-proposals-pub icon indicating copy to clipboard operation
cpp-proposals-pub copied to clipboard

P0009: Same interface for `is_always_strided`

Open tpadioleau opened this issue 4 years ago • 2 comments

The mapping for layout_stride has a strides() member function to retrieve at once all the strides whereas layout_left and layout_right do not. I was wondering if it could be possible to require for all mappings satisfying is_always_strided() to implement both stride(size_t) and strides() ? This could ease writing generic code with a strided_layout concept.

Thomas P.

tpadioleau avatar Nov 18 '21 09:11 tpadioleau

Considering where the design process is and the time limit for getting into C++23 we would need to do this via a national body comment.

crtrott avatar Jan 05 '22 18:01 crtrott

If it does not fit for C++23 it is not a big deal.

tpadioleau avatar Jan 18 '22 17:01 tpadioleau