Share via

Reach error statement in a header file when I shouldn't

Kane, Derek 0 Reputation points
2026-03-04T15:28:09.6+00:00

When I include cccl/atomic in a .cu file on VisualStudio 2022, CUDA Toolkit 13.1, I get an error related to requiring C++ 17:

#error: libcu++ requires at least C++ 17. Define CCCL_IGNORE_DEPRECATED_CPP_DIALECT to suppress this message.

Screenshot 2026-03-04 100859

The error comes from these lines in the cpp_dialect.hpp file from Nvidia:

User's image

I have enabled C++17 in the project, and when I hover over “_CCCL_STD_VER”, I see that it is defined to be “2017”:

User's image

So I should not be reaching the error statement. Does anyone have any suggestions for whether this is a VisualStudio problem or a CUDA/nvcc problem, and how I might resolve it?

Thank you,

Derek

Developer technologies | Visual Studio | Other
Developer technologies | Visual Studio | Other

A family of Microsoft suites of integrated development tools for building applications for Windows, the web, mobile devices and many other platforms. Miscellaneous topics that do not fit into specific categories.

{count} votes

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.