<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/104749>104749</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Incorrect std::is_trivially_copy_constructible result
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          Fedr
      </td>
    </tr>
</table>

<pre>
    This program
```c++
#include <type_traits>

struct MoveOnly
{
    MoveOnly()  = default;
 ~MoveOnly() = default;

    MoveOnly(const MoveOnly&)            = delete;
    MoveOnly& operator=(const MoveOnly&) = delete;

 MoveOnly(MoveOnly&&) noexcept            = default;
    MoveOnly& operator=(MoveOnly&&) noexcept = default;
};

template <typename T>
struct Wrapper
{
    Wrapper(const Wrapper&)
 requires(!std::is_trivially_copy_constructible_v<T> && std::is_copy_constructible_v<T>) 
    {
    }

    Wrapper(const Wrapper&)
        requires(std::is_trivially_copy_constructible_v<T>) = default;
};

static_assert(not std::is_trivially_copy_constructible_v<MoveOnly>);
static_assert(not std::is_copy_constructible_v<MoveOnly>);
static_assert( std::is_trivially_copyable_v<MoveOnly>);

static_assert(not std::is_trivially_copy_constructible_v<Wrapper<MoveOnly>>);
static_assert(not std::is_copy_constructible_v<Wrapper<MoveOnly>>);
static_assert( std::is_trivially_copyable_v<Wrapper<MoveOnly>>);
```
is accepted by GCC and MSVC, but Clang rejects the last `static_assert`. Online demo: https://gcc.godbolt.org/z/f8343qe3h

Related discussion: https://stackoverflow.com/q/78885178/7325599
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyslV2P6jYQhn-Nc2Md5Nj5vMgFB5qqF0dHalftJXKcAdyaOGtP2NKL_vYqIXwuy7I9G0WB4PEz78w7JNJ7vWoAChJ_JfE8kB2urStKqF1Q2XpXPK21p62zKyc3hM0Jm5KE7U9F-Nf-3P_KhW6U6WqgRMxw18ICndToifhpjBiuHl2nkH6zW_jemN24lI4USulpiWeE55QSMac1LGVnkIhD3L9XUbeCbiKVbfxZep4MOU7HHmQA4ZTsgpBQ24KTaB0R87eANygj60zKxZ5hW2PhbwUtvhZ0Vf5dRXe4N9uUzq9EImxaI_HoZCM3QJ-ORo4W_uFk24K74eBh5dCc430vZgxz8NxpB37wL_RYEzElYqr9Ap3eamnMbqFs21-afUJdGVhsiZj1Sui-OHq-8U744MlR34XYvvyrcXlE_3iclfHhGt6c21eGeJSo1UJ6Dw4JzxqL9EPpjiMxZD3S3-P-GO2ORPkO6pPKPhh3medTevB_0I805BHu8Qm8v9WeStX_vaGm1Y7-PJtR2dT022-_zwif0apDOjOyWVEHf4JCT3EN1EiPlCTsUmPCJvR7Y3QDtIaNJWJK14it71XzkvBypdRkZevKGpxYtyK8_IfwcpmJSDyDWJ-79yv0z5Ca1tqrznttm9c4j1L9Zbfglsa-TJTdEF4-E16mWZbFYZr1XwWP4zwP6kLUuchlAEWY8ojFSZxmwbpIhIhTrpI6CcMqA6aiJIszLgREUSK4DHTBGY9YFuYsE0mYTWQo45izBGrGomWUk4jBRmozMWa76asKtPcdFCGL0igPjKzA-OEFyXkDL3RYJZz370tX9Ju-VN3Kk4gZ7dGfMKjRQPFLo6xzoB6fXerAdwaDzpniqv0a1101NqrPM358aZ3tvSW8HNR5wstR_rbg_wUAAP__AcdxUw">