title: C++ Two templates, same name, same signatures, different classes: How to force compiler to use intended one?
body: <p>I am trying to use the following C++ template:</p>
  <pre><code>    _CONSTEXPR20 void swap(_Ty&amp; _Left, _Ty&amp; _Right) noexcept(
      is_nothrow_move_constructible_v&lt;_Ty&gt;&amp;&amp; is_nothrow_move_assignable_v&lt;_Ty&gt;) {
      _Ty _Tmp = _STD move(_Left);
      _Left    = _STD move(_Right);
      _Right   = _STD move(_Tmp);
  }
  </code></pre>
  <p>from the Microsoft utility standard header (core), but the compiler keeps using the following template:</p>
  <pre><code>inline void swap(thread&amp; _Left, thread&amp; _Right) noexcept {
      _Left.swap(_Right);
  }
  </code></pre>
  <p>from the Microsoft thread standard header.</p>
  <p>How to force the compiler to use the first implementation?</p>