title: error C2065: 'static_pointer_cast' : undeclared identifier - Visual Studio 2010
body: <p>I am trying to static cast a <code>std::shared_ptr</code> to its base class. Given the classes:</p>
  
  <pre><code>class ImportFileSetting {};
  class ImportFileSettingSelect:ImportFileSetting {}
  </code></pre>
  
  <p>I tried the following code:</p>
  
  <pre><code>std::shared_ptr&lt;ImportFileSettingSelect&gt; selectedSheet_ = std::make_shared&lt;ImportFileSettingSelect&gt;();
  std::vector&lt;std::shared_ptr&lt;ImportFileSetting&gt;&gt; settings_;
  settings_.push_back(static_pointer_cast&lt;ImportFileSetting&gt;(selectedSheet_));
  </code></pre>
  
  <p>which I found according to <a href="http://en.cppreference.com/w/cpp/memory/shared_ptr/pointer_cast" rel="nofollow">cppreference.com</a>. But it fails to compile with:</p>
  
  <pre><code>5&gt;src\TechAdminServices\database\techCore\processes\ImportDataSourceExcel.cpp(32): error C2065: 'static_pointer_cast' : undeclared identifier
  5&gt;src\TechAdminServices\database\techCore\processes\ImportDataSourceExcel.cpp(32): error C2275: 'ImportFileSetting' : illegal use of this type as an expression
  5&gt;          d:\techsys\techadmin\techadminservices\src\techadminservices\database\techcore\processes\ImportFileSetting.h(7) : see declaration of 'ImportFileSetting'
  </code></pre>
  
  <p>How do I fix this?</p>