add a __call_result_t alias template, implement __is_callable_v with it#3527
Merged
ericniebler merged 2 commits intoNVIDIA:mainfrom Jan 25, 2025
Merged
add a __call_result_t alias template, implement __is_callable_v with it#3527ericniebler merged 2 commits intoNVIDIA:mainfrom
__call_result_t alias template, implement __is_callable_v with it#3527ericniebler merged 2 commits intoNVIDIA:mainfrom
Conversation
__call_result_t template alias, implement __is_callable_v with it__call_result_t alias template, implement __is_callable_v with it
Contributor
🟩 CI finished in 2h 46m: Pass: 100%/153 | Total: 1d 08h | Avg: 12m 38s | Max: 1h 00m | Hits: 508%/23359
|
| Project | |
|---|---|
| CCCL Infrastructure | |
| +/- | libcu++ |
| CUB | |
| Thrust | |
| CUDA Experimental | |
| python | |
| CCCL C Parallel Library | |
| Catch2Helper |
Modifications in project or dependencies?
| Project | |
|---|---|
| CCCL Infrastructure | |
| +/- | libcu++ |
| +/- | CUB |
| +/- | Thrust |
| +/- | CUDA Experimental |
| +/- | python |
| +/- | CCCL C Parallel Library |
| +/- | Catch2Helper |
🏃 Runner counts (total jobs: 153)
| # | Runner |
|---|---|
| 110 | linux-amd64-cpu16 |
| 17 | linux-amd64-gpu-v100-latest-1 |
| 15 | windows-amd64-cpu16 |
| 10 | linux-arm64-cpu16 |
| 1 | linux-amd64-gpu-h100-latest-1-testing |
miscco
approved these changes
Jan 25, 2025
davebayer
pushed a commit
to davebayer/cccl
that referenced
this pull request
Jan 29, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
cccl already has
__is_callable_v<Fn, Args...>to test whetherFnis callable with typeArgs...with ordinary function call syntax. i often need a way to get a callable's result, andinvoke_result_tis a heavier lift for the compiler than is needed.this PR defines a
__call_result_talias template and uses it with_IsValidExpansionto implement__is_callable[_v].