title: no match for ‘operator=’ when std::shared_ptr
body: <p>I see a code using exactly this, but that code works and mine not, any idea why?</p>
  <p>PD: im trying to implement this <a href="https://github.com/litecoincash-project/litecoincash/commit/727ef16c53c32b710d3e23091ac165dffa8f2da4#diff-97c3a52bc5fad452d82670a7fd291800bae20c7bc35bb82686c2c0a4ea7b5b98R3135" rel="nofollow noreferrer">commit</a>. See that the code is exactly the same</p>
  <pre class="lang-cpp prettyprint-override"><code>for(const auto&amp; tx : block.vtx)
      if (txHash == tx-&gt;GetHash()) {
          txNew = tx;
          foundAtOut = *pindex;
          return true;
      }
  </code></pre>
  <pre class="lang-none prettyprint-override"><code>main.cpp:2471:25: error: no match for ‘operator=’ (operand types are ‘CTransactionRef’ {aka ‘std::shared_ptr&lt;const CTransaction&gt;’} and ‘const CTransaction’)
               txNew = tx;
  </code></pre>