CUDACOMPILE : nvcc error : 'cudafe++' died with status 0xC0000005 (ACCESS_VIOLATION) in cuda 10

I want to use thrust in .cu source code. The bare minimum to create the error is:

#include <thrust/scan.h>
void foo(){}

/system:/
/windows 10, VS2015/

My second option is “skip nvcc compilation”, it VC2015 does compile with headers #include <thrust/device_ptr.h>
#include <thrust/scan.h>. But when I call “thrust::exclusive_scan(beg, end, out);”, VC++ gives me following error, scan.inl(140): error C2027: use of undefined type ‘thrust::detail::STATIC_ASSERTION_FAILURE’

It seems like a cuda 10 issue. It turns back to normal after I switched back to cuda 9.1