NVIDIA / NVIDIA/cccl

[BUG]: Non-structural types can't be passed in `constant`

Open
#9,274 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
2.5k
Forks
486
Avg merge
2d 6h
Merged PRs (30d)
295

Description

Non-structural types can't be passed as NTTP, thus extended floating point types like `__half` or `__nv_bfloat16` can't be passed in `constant`. For example ([link](https://godbolt.org/z/j9r9dznP9)):
```cpp
#include
#include
#include

#include

int main()
{
[[maybe_unused]] cuda::__argument::__constant::max()> constant{};
}
```
fails to compile.

We could make this work using mechanism described in #9273

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.