Skip to content

🎨 Adjust tuple concepts - #396

Merged
elbeno merged 1 commit into
intel:mainfrom
elbeno:tuple-algos
Jul 21, 2026
Merged

🎨 Adjust tuple concepts#396
elbeno merged 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.
Comment thread include/stdx/concepts.hpp
@elbeno
elbeno merged commit a35c5f2 into intel:main Jul 21, 2026
48 of 50 checks passed
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.

2 participants