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

    <tr>
        <th>Summary</th>
        <td>
            A possible clang bug
        </td>
    </tr>

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

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

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

<pre>
    When I compile a previous version of [qxmpp](https://github.com/qxmpp-project/qxmpp) with the latest clang, it produces a compilation error:
[build] In file included from /usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/12.0.1/../../../../include/c++/12.0.1/optional:37:
[build] /usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/12.0.1/../../../../include/c++/12.0.1/type_traits:168:35: error: no member named 'value' in 'std::is_constructible<QXmppE2eeMetadata, QXmppE2eeMetadata>'
[build]     : public __conditional_t<_B1::value, _B2, _B1>
[build]                              ~~~~~^
[build] /usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/12.0.1/../../../../include/c++/12.0.1/type_traits:173:14: note: in instantiation of template class 'std::__and_<std::is_constructible<QXmppE2eeMetadata, QXmppE2eeMetadata>, std::is_convertible<QXmppE2eeMetadata, QXmppE2eeMetadata>>' requested here
[build]     : public __conditional_t<_B1::value, __and_<_B2, _B3, _Bn...>, _B1>
[build]              ^
[build] /usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/12.0.1/../../../../include/c++/12.0.1/type_traits:173:14: note: in instantiation of template class 'std::__and_<std::__not_<std::is_same<std::in_place_t, QXmppE2eeMetadata>>, std::is_constructible<QXmppE2eeMetadata, QXmppE2eeMetadata>, std::is_convertible<QXmppE2eeMetadata, QXmppE2eeMetadata>>' requested here
[build] /usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/12.0.1/../../../../include/c++/12.0.1/type_traits:188:37: note: in instantiation of template class 'std::__and_<std::__not_<std::is_same<std::optional<QXmppE2eeMetadata>, QXmppE2eeMetadata>>, std::__not_<std::is_same<std::in_place_t, QXmppE2eeMetadata>>, std::is_constructible<QXmppE2eeMetadata, QXmppE2eeMetadata>, std::is_convertible<QXmppE2eeMetadata, QXmppE2eeMetadata>>' requested here
[build]     inline constexpr bool __and_v = __and_<_Bn...>::value;
[build]                                     ^
[build] /usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/12.0.1/../../../../include/c++/12.0.1/optional:730:32: note: in instantiation of variable template specialization 'std::__and_v<std::__not_<std::is_same<std::optional<QXmppE2eeMetadata>, QXmppE2eeMetadata>>, std::__not_<std::is_same<std::in_place_t, QXmppE2eeMetadata>>, std::is_constructible<QXmppE2eeMetadata, QXmppE2eeMetadata>, std::is_convertible<QXmppE2eeMetadata, QXmppE2eeMetadata>>' requested here
[build]         using _Requires = enable_if_t<__and_v<_Cond...>, bool>;
[build]                                       ^
[build] /usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/12.0.1/../../../../include/c++/12.0.1/optional:743:31: note: in instantiation of template type alias '_Requires' requested here
[build]                          is_convertible<_Up, _Tp>> = true>
[build]                                                    ^
[build] /usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/12.0.1/../../../../include/c++/12.0.1/optional:745:2: note: (skipping 4 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all)
[build]         optional(_Up&& __t)
[build]         ^
[build] /usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/12.0.1/../../../../include/c++/12.0.1/type_traits:173:14: note: in instantiation of template class 'std::__and_<std::is_constructible<QXmppE2eeMetadata, QXmppE2eeMetadata>, std::is_assignable<QXmppE2eeMetadata &, QXmppE2eeMetadata>>' requested here
[build]     : public __conditional_t<_B1::value, __and_<_B2, _B3, _Bn...>, _B1>
[build]              ^
[build] /usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/12.0.1/../../../../include/c++/12.0.1/type_traits:173:14: note: in instantiation of template class 'std::__and_<std::__not_<std::__and_<std::is_scalar<QXmppE2eeMetadata>, std::is_same<QXmppE2eeMetadata, QXmppE2eeMetadata>>>, std::is_constructible<QXmppE2eeMetadata, QXmppE2eeMetadata>, std::is_assignable<QXmppE2eeMetadata &, QXmppE2eeMetadata>>' requested here
[build] /usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/12.0.1/../../../../include/c++/12.0.1/type_traits:188:37: note: in instantiation of template class 'std::__and_<std::__not_<std::is_same<std::optional<QXmppE2eeMetadata>, QXmppE2eeMetadata>>, std::__not_<std::__and_<std::is_scalar<QXmppE2eeMetadata>, std::is_same<QXmppE2eeMetadata, QXmppE2eeMetadata>>>, std::is_constructible<QXmppE2eeMetadata, QXmppE2eeMetadata>, std::is_assignable<QXmppE2eeMetadata &, QXmppE2eeMetadata>>' requested here
[build]     inline constexpr bool __and_v = __and_<_Bn...>::value;
[build]                                     ^
[build] /usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/12.0.1/../../../../include/c++/12.0.1/optional:838:14: note: in instantiation of variable template specialization 'std::__and_v<std::__not_<std::is_same<std::optional<QXmppE2eeMetadata>, QXmppE2eeMetadata>>, std::__not_<std::__and_<std::is_scalar<QXmppE2eeMetadata>, std::is_same<QXmppE2eeMetadata, QXmppE2eeMetadata>>>, std::is_constructible<QXmppE2eeMetadata, QXmppE2eeMetadata>, std::is_assignable<QXmppE2eeMetadata &, QXmppE2eeMetadata>>' requested here
[build]         enable_if_t<__and_v<__not_self<_Up>,
[build]                     ^
[build] /home/haozhong/project/commitbug/result/wild/qxmpp/tests/qxmppstanza/tst_qxmppstanza.cpp:390:18: note: while substituting deduced template arguments into function template 'operator=' [with _Up = QXmppE2eeMetadata]
[build]     e2eeMetadata = QXmppE2eeMetadata();
[build]                  ^
[build] 1 error generated.

The message looks strange. Is it a bug in clang? I notice that [qxmpp](https://github.com/qxmpp-project/qxmpp) proposed a workaround to fix the problem:

https://github.com/qxmpp-project/qxmpp/commit/102493de1743d6b010d0274635da37ea3f434473
</pre>
<img width="1px" height="1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