CUDA uses a single-source approach, meaning that the host (CPU) and device (GPU) code are in the same file. So it requires a special compiler (nvcc) that splits the original source files, compiles the host and device parts separately, and then merges the result back together.
This requires nvcc and the device compiler to have exact knowledge of how the host compiler compiles every single construct (thing e.g. about alignment and padding in complex structures), and they must at least be able to parse the syntax of the host include files (which e.g. fails if the include files have C++11 syntax, but the device compiler only knows how to parse C++98).
The cuda compiler itself (nvcc) is far behind the features of more recent compilers. For instance, c++11 is supported, but not the full standard. It will take a while before 14/17 are supported.
how does that stop it from using the latest version of clang++ or g++? they are backwards compatible with older C++ versions. The context is linux and a makefile failing with a message that your g++ or clang++ must be a version older than something
This requires nvcc and the device compiler to have exact knowledge of how the host compiler compiles every single construct (thing e.g. about alignment and padding in complex structures), and they must at least be able to parse the syntax of the host include files (which e.g. fails if the include files have C++11 syntax, but the device compiler only knows how to parse C++98).