title: Expression must be an lvalue
body: <p>There are a lot of such questions, but going through them didn't solve problem in my case.</p>
  
  <p>The <code>PSSetShaderResources</code> as a 3rd parameter wants <code>ID3DShaderResourceView* const*</code>.</p>
  
  <p>so I cannot make it this way (because I am getting the lvalue error):</p>
  
  <pre><code>// std::unique_ptr&lt;Texture&gt; mTexture;
  // ID3D11ShaderResourceView* Texture::getTexture() const {
  //     return mTexture;
  // }
  
  deviceContext-&gt;PSSetShaderResources( 0U, 1U, &amp;mTexture-&gt;getTexture() );
  </code></pre>
  
  <p>That's why I found a way around to make it this way:</p>
  
  <pre><code>auto tex = mTexture-&gt;getTexture();
  deviceContext-&gt;PSSetShaderResources( 0U, 1U, &amp;tex );
  </code></pre>
  
  <p>However, I'd like to get rid of the <code>auto tex = ...</code> line. <strong>Is there any possibility to change the getTexture() method (or without changing it) to write just as in the first case?</strong></p>