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.
This is usually not a Visual Studio issue, it’s a mismatch between what MSVC thinks the standard is and what NVCC is actually using.
Even if you enabled C++17 in the project, NVCC often still defaults to an older standard unless you explicitly pass it.
A couple of things to check:
- Make sure NVCC is using C++17 In your CUDA project settings:
- CUDA C/C++ → Language → C++ Language Standard → set it to
C++17
OR manually add:
-std=c++17
- Host compiler flags Sometimes MSVC is set correctly, but NVCC’s host compiler isn’t picking it up. You can force it with:
-Xcompiler "/std:c++17"
- IntelliSense vs actual compile The
_CCCL_STD_VERshowing 2017 in hover is IntelliSense, not necessarily what NVCC uses during compilation. The actual compile step can still be using an older dialect. - Quick workaround (not ideal) You can define:
CCCL_IGNORE_DEPRECATED_CPP_DIALECT
but that just suppresses the error, it doesn’t fix the underlying mismatch.