Using Async Thrust Functions in Windows

I need to use some async gather operations(I know async gather is not implemented yet and it uses transform in the backend). I intend to use thrust::async::transform, however I cannot build the code in Visual Studio. The reason is most probably THRUST_CPP_DIALECT and THRUST_LEGACY_GCC directives. My question: is it possible to use async transform in Windows or can I trick thrust by changing the values of THRUST_CPP_DIALECT and THRUST_LEGACY_GCC?

Thrust uses __cplusplus macro definition, thus you need to add /Zc:__cplusplus compiler flag for cpp-files (for MSVC), and -Xcompiler="/Zc:__cplusplus" for cu-files (i.e., for NVCC).

If you use CMake to generate MSBuild project, then the correct way to add NVCC flag per executable/library is target_compile_options(your_library_name PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:-Xcompiler="/Zc:__cplusplus">)