title: Is '_HAS_CXX17' macro usable in custom project headers to enable C++17 language set features?
body: <p>I want to create headers which use 'optional' from standard C++.
  However, My headers will be referred from Visual Studio 2015 as well as Visual Studio 2017 projects.</p>
  
  <p>I would like to have something, such that for Visual Studio 2017 ( with C++ 17 lang feature set) , std::optional is used and with Visual Studio 2015, boost::optional gets used.</p>
  
  <p>I am thinking of something like this:</p>
  
  <pre><code>#include &lt;yvals.h&gt;
  #if _HAS_CXX17
   #include &lt;optional&gt;
   template &lt;typename T&gt; using Optional = std::optional&lt;T&gt;;
  #else
   #include "boost/optional/optional.hpp"
   template &lt;typename T&gt; using Optional = boost::optional&lt;T&gt;;
  #endif
  </code></pre>
  
  <p>Is it okay to use '_HAS_CXX17' macro this way? 
  Is there a better way of doing this?</p>