title: Universal reference deduction using the same_as concept
body: <p>I'm trying to implement a push function for a blocking queue which accepts a universal reference as it's template parameter, but requires that the template argument be the same type as the queue's element type:</p>
  <pre><code>template &lt;typename ValueType&gt;
  class shared_queue
  {
  public:
      template &lt;typename Arg&gt;
          requires std::same_as&lt;Arg, ValueType&gt;
      void push(Arg&amp;&amp; arg);
  private:
      std::deque&lt;ValueType&gt; container_;
  };
  </code></pre>
  <p>However, I'm not quite sure how is universal reference deduction supposed to work in this case, or if it works at all for that matter. The following code:</p>
  <pre><code>shared_queue&lt;int&gt; sq;
  int x{ 5 };
  sq.push(x); // won't compile
  sq.push(5); // all good
  </code></pre>
  <p>does not compile. The compiler complains that:
  <a href="https://i.stack.imgur.com/tTeTY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tTeTY.png" alt="Compiler error, constraints not satisfied" /></a></p>
  <p>I'm pretty sure I'm misunderstanding something but I don't know what.</p>