<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </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 --- - is_constructible_v<tuple<move_only>, const move_only&> explodes"
   href="https://llvm.org/bugs/show_bug.cgi?id=30979">30979</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>is_constructible_v<tuple<move_only>, const move_only&> explodes
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libc++
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </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>All Bugs
          </td>
        </tr>

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

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

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, mclow.lists@gmail.com
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>#include <tuple>

struct move_only
{
    move_only() = default;
    move_only(move_only&&) = default;
};

static_assert(!std::is_constructible_v<std::tuple<move_only>, const move_only
&>);

results in (<a href="http://melpon.org/wandbox/permlink/7eV9ndEz2fYroRgZ">http://melpon.org/wandbox/permlink/7eV9ndEz2fYroRgZ</a>):

In file included from prog.cc:1:
/usr/local/libcxx-head/include/c++/v1/tuple:385:13: error: no matching
constructor for initialization of '__tuple_leaf<0UL, move_only>'
            __tuple_leaf<_Uf, _Tf>(_VSTD::forward<_Up>(__u))...,
            ^                      ~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/libcxx-head/include/c++/v1/tuple:641:11: note: in instantiation of
function template specialization
'std::__1::__tuple_impl<std::__1::__tuple_indices<0>,
move_only>::__tuple_impl<0, move_only, const move_only &>' requested here
        : base_(typename __make_tuple_indices<sizeof...(_Tp)>::type(),
          ^
/usr/local/libcxx-head/include/c++/v1/type_traits:3016:38: note: in
instantiation of function template specialization
'std::__1::tuple<move_only>::tuple<true, false>' requested here
    : public integral_constant<bool, __is_constructible(_Tp, _Args...)>
                                     ^
/usr/local/libcxx-head/include/c++/v1/type_traits:3200:7: note: in
instantiation of template class
'std::__1::is_constructible<std::__1::tuple<move_only>, const move_only &>'
requested here
    = is_constructible<_Tp, _Args...>::value;
      ^
prog.cc:9:21: note: in instantiation of variable template specialization
'std::__1::is_constructible_v<std::__1::tuple<move_only>, const move_only &>'
requested here
static_assert(!std::is_constructible_v<std::tuple<move_only>, const move_only
&>);
                    ^
/usr/local/libcxx-head/include/c++/v1/tuple:325:5: note: candidate constructor
not viable: no known conversion from 'const move_only' to 'const
std::__1::__tuple_leaf<0, move_only, true>' for 1st argument
    __tuple_leaf(__tuple_leaf const &) = default;
    ^
/usr/local/libcxx-head/include/c++/v1/tuple:326:5: note: candidate constructor
not viable: no known conversion from 'const move_only' to
'std::__1::__tuple_leaf<0, move_only, true>' for 1st argument
    __tuple_leaf(__tuple_leaf &&) = default;
    ^
/usr/local/libcxx-head/include/c++/v1/tuple:300:19: note: candidate template
ignored: disabled by 'enable_if' [with _Tp = const move_only &]
                  __lazy_and<
                  ^
/usr/local/libcxx-head/include/c++/v1/tuple:286:9: note: candidate constructor
template not viable: requires 2 arguments, but 1 was provided
        __tuple_leaf(integral_constant<int, 0>, const _Alloc&) {}
        ^
/usr/local/libcxx-head/include/c++/v1/tuple:290:9: note: candidate constructor
template not viable: requires 2 arguments, but 1 was provided
        __tuple_leaf(integral_constant<int, 1>, const _Alloc& __a)
        ^
/usr/local/libcxx-head/include/c++/v1/tuple:295:9: note: candidate constructor
template not viable: requires 2 arguments, but 1 was provided
        __tuple_leaf(integral_constant<int, 2>, const _Alloc& __a)
        ^
/usr/local/libcxx-head/include/c++/v1/tuple:312:18: note: candidate constructor
template not viable: requires 3 arguments, but 1 was provided
        explicit __tuple_leaf(integral_constant<int, 0>, const _Alloc&, _Tp&&
__t)
                 ^
/usr/local/libcxx-head/include/c++/v1/tuple:317:18: note: candidate constructor
template not viable: requires 3 arguments, but 1 was provided
        explicit __tuple_leaf(integral_constant<int, 1>, const _Alloc& __a,
_Tp&& __t)
                 ^
/usr/local/libcxx-head/include/c++/v1/tuple:322:18: note: candidate constructor
template not viable: requires 3 arguments, but 1 was provided
        explicit __tuple_leaf(integral_constant<int, 2>, const _Alloc& __a,
_Tp&& __t)
                 ^
/usr/local/libcxx-head/include/c++/v1/tuple:281:49: note: candidate constructor
not viable: requires 0 arguments, but 1 was provided
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR __tuple_leaf()
                                                ^
prog.cc:9:1: error: static_assert failed
static_assert(!std::is_constructible_v<std::tuple<move_only>, const move_only
&>);
^            
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.

I might be reading the code wrong, but it seems to me that for the constructors
taking const _Tp&..., the _CheckArgsConstructor<_Dummy>::template
__enable_implicit<_Tp...>() in the SFINAE condition should use
__enable_implicit<const _Tp&...> instead (and likewise for the explicit
variant).</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>