Skip to content

Conversation

@lixin-wei
Copy link
Contributor

@lixin-wei lixin-wei commented Jan 16, 2026

Met a compile error when passing a lot of elements to when_all.

This PR fixes it.

@copy-pr-bot
Copy link

copy-pr-bot bot commented Jan 16, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@lixin-wei lixin-wei changed the title Fix compile error for tuple size >= 8 Fix compile error for tuple size > 8 Jan 16, 2026
Copy link
Collaborator

@ericniebler ericniebler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch.

// Only use __valN accessors for tuples with <= 8 elements (which have specialized storage)
// Larger tuples use __box base class and need __tup::__get
if constexpr (__size > 8) {
return __tup::__get<_Index>(static_cast<_Tuple&&>(__tupl));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm curious why you moved this branch to the top. i expect tuples larger than 8 elements to be quite rare, which is why i put the fallback branch last.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because tuples larger than 8 elements don't have __val fields.

if we put this to the end, the compile will fail.

@ericniebler
Copy link
Collaborator

/ok to test 7f1cd60

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