<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 - `llvm::is_trivially_copyable` -- static assertion failure after DR 1734"
   href="https://bugs.llvm.org/show_bug.cgi?id=47160">47160</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>`llvm::is_trivially_copyable` -- static assertion failure after DR 1734
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

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

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>release blocker
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>Support Libraries
          </td>
        </tr>

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

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

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I believe only VC++ 19.27 (latest version) actually implements DR 1734, but
`llvm::is_trivially_copyable` doesn't agree with `std::is_trivially_copyable`
on `pair<void*, size_t>` after DR 1734. This results in a build error:

C:\...\llvm\include\llvm/Support/type_traits.h(181): error C2338: inconsistent
behavior between llvm:: and std:: implementation of is_trivially_copyable
C:\...\llvm\include\llvm/ADT/SmallVector.h(315): note: see reference to class
template instantiation 'llvm::is_trivially_copyable<T>' being compiled
        with
        [
            T=std::pair<void *,size_t>
        ]
C:\...\llvm\include\llvm/ADT/SmallVector.h(837): note: see reference to class
template instantiation 'llvm::SmallVectorImpl<T>' being compiled
        with
        [
            T=std::pair<void *,size_t>
        ]
C:\...\llvm\include\llvm/Support/Allocator.h(378): note: see reference to class
template instantiation 'llvm::SmallVector<std::pair<void *,size_t>,0>' being
compiled
C:\...\llvm\include\llvm/Support/Allocator.h(435): note: see reference to class
template instantiation
'llvm::BumpPtrAllocatorImpl<AllocatorT,SlabSize,SizeThreshold>' being compiled
C:\...\llvm\include\llvm/ADT/SmallVector.h(315): error C2976:
'llvm::SmallVectorTemplateBase': too few template arguments
C:\...\llvm\include\llvm/ADT/SmallVector.h(179): note: see declaration of
'llvm::SmallVectorTemplateBase'

A simple example of a program that changes behavior after DR 1734 is the
following:

struct meow {
    meow(const meow&) = default;
    meow& operator=(const volatile meow&) = delete;
    template <class U = meow>
    meow& operator=(const U&) {}
};
static_assert(__is_trivially_copyable(meow));</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>