NVIDIA / NVIDIA/cccl

Null references used for type dispatch

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

Description

Here: https://github.com/thrust/thrust/blob/417d78471dadefa3087ff274e64f43ce74acfd3d/thrust/detail/reference.inl#L120 and at some other places in this file and also in its associated `.h` file, null pointers are created and passed to functions which are known to dereference them.

According to the comments and by looking at how they are ultimately used, it seems that we only care about the type. Is there anything that prevents using meta-programmation instead of passing actual, invalid values?

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.