Skip to content

🎨 Adjust tuple concepts#396

Open
elbeno wants to merge 1 commit into
intel:mainfrom
elbeno:tuple-algos
Open

🎨 Adjust tuple concepts#396
elbeno wants to merge 1 commit into
intel:mainfrom
elbeno:tuple-algos

Conversation

@elbeno

@elbeno elbeno commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Problem:

  • Algorithms like all_of don't work with std::tuple or std::array.

Solution:

  • Adjust concepts to separate has_tuple_protocol and has_array_protocol (note: has_array_protocol subsumes has_tuple_protocol.
  • Allow tuple algorithms to work with std::tuple by constraining on has_tuple_protocol instead of tuplelike (which means just stdx::tuple).
  • Add more unrolled_* algorithms to deal with those use cases for arrays and spans.

Problem:
- Algorithms like `all_of` don't work with `std::tuple` or `std::array`.

Solution:
- Adjust concepts to separate `has_tuple_protocol` and
  `has_array_protocol` (note: `has_array_protocol` subsumes
  `has_tuple_protocol`.
- Allow tuple algorithms to work with `std::tuple` by constraining on
  `has_tuple_protocol` instead of `tuplelike` (which means just `stdx::tuple`).
- Add more `unrolled_*` algorithms to deal with those use cases for arrays and
  spans.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant