Libtorch under std:c++latest

username: dambo
cooked: <p>Hello,</p>
<p>Following this post:</p><aside class="quote quote-modified" data-post="1" data-topic="73793">
  <div class="title">
    <div class="quote-controls"></div>
    <img loading="lazy" alt="" width="24" height="24" src="https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/shakiba_kh/48/21262_2.png" class="avatar">
    <a href="https://discuss.pytorch.org/t/libtorch-c-17-visual-studio/73793">Libtorch + C++17 + Visual Studio</a> 
  </div>
  <blockquote>
    Hello all, 
environment: 
Windows 10 
CUDA 10.1 
CuDNN 7.6.5 
libtorch from pytorch website, release mode (latest stable one) 
I am able to use libtorch in a separate Visual Studio 2017 project and do the inference. 
However, I need to link libtorch to another project which is using C++17 and I get deprecation errors like this: 
Error	C4996	'std::result_of_t': warning STL4014: std::result_of and std::result_of_t are deprecated in C++17. They are superseded by std::invoke_result and std::invoke_r…
  </blockquote>
</aside>
<p>
and this one:</p><aside class="onebox githubissue" data-onebox-src="https://github.com/Siv3D/OpenSiv3D/issues/532">
  <header class="source">

      <a href="https://github.com/Siv3D/OpenSiv3D/issues/532" target="_blank" rel="noopener nofollow ugc">github.com/Siv3D/OpenSiv3D</a>
  </header>

  <article class="onebox-body">
    <div class="github-row">
  <div class="github-icon-container" title="Issue">
	  <svg width="60" height="60" class="github-icon" viewBox="0 0 14 16" aria-hidden="true"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg>
  </div>

  <div class="github-info-container">
    <h4>
      <a href="https://github.com/Siv3D/OpenSiv3D/issues/532" target="_blank" rel="noopener nofollow ugc">My project (libtorch c++) is ISO C++14 Standard (/std:c++14)</a>
    </h4>

    <div class="github-info">
      <div class="date">
        opened <span class="discourse-local-date" data-format="ll" data-date="2020-09-15" data-time="20:43:27" data-timezone="UTC">08:43PM - 15 Sep 20 UTC</span>
      </div>

        <div class="date">
          closed <span class="discourse-local-date" data-format="ll" data-date="2020-09-20" data-time="09:33:01" data-timezone="UTC">09:33AM - 20 Sep 20 UTC</span>
        </div>

      <div class="user">
        <a href="https://github.com/ghost" target="_blank" rel="noopener nofollow ugc">
          <img alt="ghost" src="https://avatars.githubusercontent.com/u/10137?v=4" class="onebox-avatar-inline" width="20" height="20">
          ghost
        </a>
      </div>
    </div>

    <div class="labels">
        <span style="display:inline-block;margin-top:2px;background-color: #B8B8B8;padding: 2px;border-radius: 4px;color: #fff;margin-left: 3px;">
          question
        </span>
    </div>
  </div>
</div>

  <div class="github-row">
    <p class="github-body-container">However, you require std:c++latest when using VC. 
Anyway this can be resolved?<span class="show-more-container"><a href="" rel="noopener" class="show-more">…</a></span><span class="excerpt hidden"> 
I am trying to integrate both libraries.</span></p>
  </div>

  </article>

  <div class="onebox-metadata">
    
    
  </div>

  <div style="clear: both"></div>
</aside>
<p>
I am trying to integrate Libtorch into the Siv3d gaming environment which only works with std++latest.</p>
<p>Is there anything I can do to remedy this? The version that Libtorch works with is std++17 but not std++latest.</p>
<p><div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/4/2/4202cf2e5c6a47731c371ed31cb4bab519f97d46.png" data-download-href="https://discuss.pytorch.org/uploads/default/4202cf2e5c6a47731c371ed31cb4bab519f97d46" title="image"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/4/2/4202cf2e5c6a47731c371ed31cb4bab519f97d46_2_690x422.png" alt="image" data-base62-sha1="9pXwYOujwiFbR1dGlVzh2ylWsaG" width="690" height="422" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/4/2/4202cf2e5c6a47731c371ed31cb4bab519f97d46_2_690x422.png, https://discuss.pytorch.org/uploads/default/optimized/3X/4/2/4202cf2e5c6a47731c371ed31cb4bab519f97d46_2_1035x633.png 1.5x, https://discuss.pytorch.org/uploads/default/optimized/3X/4/2/4202cf2e5c6a47731c371ed31cb4bab519f97d46_2_1380x844.png 2x" data-dominant-color="9B9B9C"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">image</span><span class="informations">1597×978 102 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div><br>
Thanks</p>

username: Lin_Jia
cooked: <p>Hmmm… this is interesting. C++ 20 seems to be able to formally published at the end of this year. <a href="https://isocpp.org/std/status" rel="nofollow noopener">https://isocpp.org/std/status</a></p>
<p>It is interesting that Siv3D forces you to use C++20. I am sure that once C++ formally publishes, Libtorch will followup and support that.</p>

username: dambo
cooked: <p>Siv3d provided a workaround which was easy to do.</p>