refactor: [WIP] convert slices from CRTP to C++20 concepts by sbstndb · Pull Request #2866 · xtensor-stack/xtensor

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

@sbstndb

Copy link Copy Markdown

Contributor

@sbstndb sbstndb commented

Oct 21, 2025

Description

Convert slices from CRTP to C++20 concepts

Checklist

  • The title and commit message(s) are descriptive.
  • Small commits made to fix your PR have been squashed to avoid history pollution.
  • Tests have been added for new features or bug fixes.
  • API of new functions and classes are documented.
Use if constexpr with auto return types for slice helper functions.

@sbstndb

Copy link Copy Markdown

Contributor Author

sbstndb commented

Oct 21, 2025

It seems that some conversions are still missing. This PR needs a little more work before it can be reviewed and merged.

Replace xtl::is_integral<T>::value trait with xtl::integral_concept
for consistency with existing C++20 concepts.
Add braces to if constexpr blocks for consistency.

@sbstndb sbstndb changed the title refactor: convert slices from CRTP to C++20 concepts refactor: [WIP] convert slices from CRTP to C++20 concepts

Oct 22, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

@sbstndb