Skip to content

__aggregate_all_of Internal utility to recursively apply a predicate to aggregate members#8347

Open
fbusato wants to merge 3 commits intoNVIDIA:mainfrom
fbusato:aggregate_members_all_of
Open

__aggregate_all_of Internal utility to recursively apply a predicate to aggregate members#8347
fbusato wants to merge 3 commits intoNVIDIA:mainfrom
fbusato:aggregate_members_all_of

Conversation

@fbusato
Copy link
Copy Markdown
Contributor

@fbusato fbusato commented Apr 9, 2026

Description

__aggregate_all_of is useful to extract properties for custom traits.

Extract from:

@fbusato fbusato self-assigned this Apr 9, 2026
@fbusato fbusato added this to CCCL Apr 9, 2026
@fbusato fbusato requested a review from a team as a code owner April 9, 2026 19:40
@fbusato fbusato added the libcu++ For all items related to libcu++ label Apr 9, 2026
@fbusato fbusato requested a review from wmaxey April 9, 2026 19:40
@github-project-automation github-project-automation bot moved this to Todo in CCCL Apr 9, 2026
@cccl-authenticator-app cccl-authenticator-app bot moved this from Todo to In Review in CCCL Apr 9, 2026
@github-actions

This comment has been minimized.

@github-actions
Copy link
Copy Markdown
Contributor

🥳 CI Workflow Results

🟩 Finished in 1h 45m: Pass: 100%/108 | Total: 19h 46m | Max: 1h 36m | Hits: 99%/281804

See results here.

@fbusato
Copy link
Copy Markdown
Contributor Author

fbusato commented Apr 10, 2026

@miscco @davebayer @gevtushenko considering the complexity, the impact on compile time, and a couple of compatibility problems with MSVC, I'm not 100% sure it worth to add it.

details:

  • compile time: the trait adds an initializer one by one, until it reaches the maximum.
  • MSVC doesn't support arrays and nested structures.

@wmaxey
Copy link
Copy Markdown
Member

wmaxey commented Apr 10, 2026

* MSVC doesn't support arrays and nested structures.

I remember vaguely finding this trick before and decided to write it off based on this. I think we should wait for proper reflection unless this immediately solves problems of our own making internally where we can control what goes through the machinery.

If we can get a guarantee that this will only be used with well supported input types, then I'd consider approving this. Otherwise leaving a footgun laying around concerns me.

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

Labels

libcu++ For all items related to libcu++

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

2 participants