kokkos / mdspan

Reference implementation of mdspan targeting C++23
Other
413 stars 69 forks source link

remove lambda expression in layout stride #311

Closed oliverlee closed 9 months ago

oliverlee commented 9 months ago

Replace a lambda expression to allow use in constant expression context in C++14.

mhoemmen commented 9 months ago

Thanks for contributing this neat solution!

We'll have to decide whether we generally want to support C++14 any more, but I think this particular fix does not overly complicate the code.

Per discussion on https://github.com/kokkos/mdspan/issues/313 , the author may wish to add to this PR, so I won't merge it quite just yet.

mhoemmen commented 9 months ago

The author says it's OK to merge this PR. Thanks for the contribution!