compile the *.cpp extension files with NVCC (Nvidia Cuda Compiler) will face the situation as thrust::detail::STATIC_ASSERTION_FAILURE<false>
, solution at here
More information for this problem
This is the expected behavior, right? I get the same error with each release of Thrust going back to 1.5.
When you create a device_vector with more than 0 elements, you are implicitly asking the compiler to compile a CUDA kernel. The problem is that when you invoke nvcc with a .cpp source file, you are compiling in C++ mode (not CUDA C++).