title: Shall structured binding be returned from a function as rvalue in C++20?
body: <p>Consider a C++20 program where in function <code>foo</code> there is a structured binding <code>auto [y]</code>. The function returns <code>y</code>, which is converted in object of type <code>A</code>. <code>A</code> can be constructed either from const reference of from rvalue-reference.</p>
  <pre><code>#include &lt;tuple&gt;
  #include &lt;iostream&gt;
  
  struct A {
      A(const int &amp;) { std::cout &lt;&lt; &quot;A(const int &amp;) &quot;; }
      A(int &amp;&amp;) { std::cout &lt;&lt; &quot;A(int &amp;&amp;) &quot;; }
  };
  
  A foo() {
      auto [y] = std::make_tuple(1);
      return y;
  }
  
  int main() { foo(); }
  </code></pre>
  <p>Which one of the constructors shall be selected according to C++20 language standard?</p>
  <p>Clang selects <code>A(const int &amp;)</code> and GCC selects <code>A(int &amp;&amp;)</code>, demo: <a href="https://gcc.godbolt.org/z/5q779vE6T" rel="noreferrer">https://gcc.godbolt.org/z/5q779vE6T</a></p>
  <p>Does one of the compilers not support yet the standard in that respect?</p>