New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nvcc compile error #2476
Comments
Which nvcc version is that? |
I tested it with CUDA 11.7 (compiler version 11.7.64). |
Could you please post the complete error? I'm a little confused at the situation.
|
I understand completely, and I agree that the error should come from the host compiler. I get the following error: |
By the way, I am testing this on Ubuntu 22.04 where the default GCC version is 11.2. I suppose that is the one used by |
Thank you. Yes. You are correct. I can reproduce this. T const& stored_object() const {
return *static_cast<T const*>(static_cast<void const*>(data));
} I suggest the above fix instead, which does not need any const cast. |
As a workaround for now, I will suggest not using |
Describe the bug
The
const
version ofCatch::Benchmark::Detail::ObjectStorage::stored_object
does not compile with nvcc (invalid type cast). The problem is solved by first casting toconst void*
and then tovoid*
usingconst_cast
.I will make a PR ASAP.
The text was updated successfully, but these errors were encountered: