title: Visual Studio 2017 msvc vs nvcc __cplusplus macro mismatch
body: <p>I am using Visual Studio 2017, platform toolset v141 and CUDA Toolkit 9.2.
  I have noticed that move constructor and move assignment are not present when compiling <strong>thrust::device_vector</strong> with nvcc. The reason is a condition which checks the value of the <strong>__cplusplus</strong> macro in the Thrust lib.</p>
  
  <p>As explained in the <a href="https://docs.microsoft.com/en-us/cpp/build/reference/zc-cplusplus?view=vs-2017" rel="nofollow noreferrer">docs</a>, I set C++ Language Standard to <strong>/std:c++17</strong> and set additionally <strong>/Zc:__cplusplus</strong> in order to have the macro defined correctly in msvc, i.e., <strong>201703</strong>.
  However for files compiled by nvcc the macro is set to <strong>199711</strong>.</p>
  
  <p>I have created a simple case that reproduces the issue.</p>
  
  <p>test.cuh:</p>
  
  <pre><code>#pragma once
  #include &lt;iostream&gt;
  void test();
  </code></pre>
  
  <p>test.cu:</p>
  
  <pre><code>#include "test.cuh"
  void test()
  {
      std::cout &lt;&lt; "CU  file: " &lt;&lt; __cplusplus &lt;&lt; std::endl;
  }
  </code></pre>
  
  <p>main.cpp:</p>
  
  <pre><code>#include "test.cuh"
  int main()
  {
      test();
      std::cout &lt;&lt; "CPP file: " &lt;&lt; __cplusplus &lt;&lt; std::endl;
      return 0;
  }
  </code></pre>
  
  <p>Outputs:</p>
  
  <pre><code>CU  file: 199711
  CPP file: 201703
  </code></pre>
  
  <p>I am looking for a solution that is applicable also to CMake with FindCUDA.</p>