<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Initializer list {{}} for tuple<tuple<>&&> fails but succeeds for tuple<tuple<> const &>"
   href="https://bugs.llvm.org/show_bug.cgi?id=38409">38409</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Initializer list {{}} for tuple<tuple<>&&> fails but succeeds for tuple<tuple<> const &>
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Macintosh
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>MacOS X
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>davidfink314@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=20630" name="attach_20630" title="program demonstrating the bug">attachment 20630</a> <a href="attachment.cgi?id=20630&action=edit" title="program demonstrating the bug">[details]</a></span>
program demonstrating the bug

Attempting to compile the attached file yields the following error.

Note that a temporary tuple binding to const & works (y), but it errors out
trying to bind to && (x).

This error is from Apple LLVM version 9.0.0 (clang-900.0.38),
but this is reproducible in clang (trunk) on godbolt.org.


clang_rvalue_bug.cpp:7:22: error: no matching constructor for initialization of
'tuple<tuple<> &&>'
    tuple<tuple<>&&> x{{}};
                     ^~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple:620:5:
note: 
      candidate constructor not viable: cannot convert initializer list
argument to 'const
      std::__1::tuple<std::__1::tuple<> &&>'
    tuple(tuple const&) = default;
    ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple:621:5:
note: 
      candidate constructor not viable: cannot convert initializer list
argument to
      'std::__1::tuple<std::__1::tuple<> &&>'
    tuple(tuple&&) = default;
    ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple:827:9:
note: 
      candidate template ignored: couldn't infer template argument '_Tuple'
        tuple(_Tuple&& __t) _NOEXCEPT_((is_nothrow_constructible<base,
_Tuple>::value))
        ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple:842:9:
note: 
      candidate template ignored: couldn't infer template argument '_Tuple'
        tuple(_Tuple&& __t) _NOEXCEPT_((is_nothrow_constructible<base,
_Tuple>::value))
        ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple:639:26:
note: 
      candidate template ignored: disabled by 'enable_if' [with _Dummy = true]
                         _CheckArgsConstructor<
                         ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple:657:26:
note: 
      candidate template ignored: disabled by 'enable_if' [with _Dummy = true]
                         _CheckArgsConstructor<
                         ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple:715:26:
note: 
      candidate template ignored: disabled by 'enable_if' [with _Up = <>,
_PackIsTuple = false]
                         _CheckArgsConstructor<
                         ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple:747:26:
note: 
      candidate template ignored: disabled by 'enable_if' [with _Up = <>]
                         _CheckArgsConstructor<
                         ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple:617:23:
note: 
      candidate constructor template not viable: requires 0 arguments, but 1
was provided
    _LIBCPP_CONSTEXPR tuple()
                      ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple:630:5:
note: 
      candidate constructor template not viable: requires 2 arguments, but 1
was provided
    tuple(_AllocArgT, _Alloc const& __a)
    ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple:682:7:
note: 
      candidate constructor template not viable: requires 3 arguments, but 1
was provided
      tuple(allocator_arg_t, const _Alloc& __a, const _Tp& ... __t)
      ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple:702:7:
note: 
      candidate constructor template not viable: requires 3 arguments, but 1
was provided
      tuple(allocator_arg_t, const _Alloc& __a, const _Tp& ... __t)
      ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple:788:9:
note: 
      candidate constructor template not viable: requires at least 2 arguments,
but 1 was provided
        tuple(allocator_arg_t, const _Alloc& __a, _Up&&... __u)
        ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple:808:9:
note: 
      candidate constructor template not viable: requires at least 2 arguments,
but 1 was provided
        tuple(allocator_arg_t, const _Alloc& __a, _Up&&... __u)
        ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple:855:9:
note: 
      candidate constructor template not viable: requires 3 arguments, but 1
was provided
        tuple(allocator_arg_t, const _Alloc& __a, _Tuple&& __t)
        ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple:869:9:
note: 
      candidate constructor template not viable: requires 3 arguments, but 1
was provided
        tuple(allocator_arg_t, const _Alloc& __a, _Tuple&& __t)</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>