<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 - Undefined use of std::deque<const int> in std::assignable_from test"
   href="https://bugs.llvm.org/show_bug.cgi?id=50716">50716</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Undefined use of std::deque<const int> in std::assignable_from test
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>12.0
          </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>enhancement
          </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>zilla@kayari.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, mclow.lists@gmail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>The tests for std::assignable_from use std::deque<const int> which is undefined
because it uses std::allocator<const int>. The Cpp17Allocator requirements say
the value type must be a non-const, non-volatile object type:

In file included from /home/jwakely/gcc/12/include/c++/12.0.0/deque:67,
                 from
std/concepts/concepts.lang/concept.assignable/assignable_from.compile.pass.cpp:17:
/home/jwakely/gcc/12/include/c++/12.0.0/bits/stl_deque.h: In instantiation of
'class std::deque<const int>':
/home/jwakely/gcc/12/include/c++/12.0.0/type_traits:3423:12:   recursively
required by substitution of 'template<class _Tp1, class _Tp2> struct
std::__common_reference_impl<_Tp1&&, _Tp2&, 1, std::void_t<typename
std::__common_ref_impl<_Tp1&&, _Tp2&, void>::type> > [with _Tp1 = const
std::deque<int>; _Tp2 = const std::deque<const int>]'
/home/jwakely/gcc/12/include/c++/12.0.0/type_traits:3423:12:   required from
'struct std::common_reference<const std::deque<int, std::allocator<int> >&,
const std::deque<const int, std::allocator<const int> >&>'
std/concepts/concepts.lang/concept.assignable/assignable_from.compile.pass.cpp:138:18:
  required from 'constexpr bool CheckAssignableFromLvalues() [with T1 =
std::deque<int>; T2 = std::deque<const int>]'
std/concepts/concepts.lang/concept.assignable/assignable_from.compile.pass.cpp:147:44:
  required from 'constexpr bool CheckAssignableFromLvaluesAndRvalues() [with T1
= std::deque<int>; T2 = std::deque<const int>]'
std/concepts/concepts.lang/concept.assignable/assignable_from.compile.pass.cpp:443:76:
  required from here
/home/jwakely/gcc/12/include/c++/12.0.0/bits/stl_deque.h:778:66: error: static
assertion failed: std::deque must have a non-const, non-volatile value_type
  778 |       static_assert(is_same<typename remove_cv<_Tp>::type, _Tp>::value,
      |                                                                  ^~~~~

Implementations are not required to support that usage. Should that
non-portable test be guarded by a preprocessor check for _LIBCPP_VERSION or
similar?</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>