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

    <tr>
        <th>Summary</th>
        <td>
            Requires expressions are not allowed to be used as bool expressions
        </td>
    </tr>

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

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

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

<pre>
    demo code: https://godbolt.org/z/6o6K9GnnY
```c++
#define was_not_an_ill_form(...) (bool(requires { __VA_ARGS__; }))
template<class T>
T declval();

struct A {};
template<class T>
constexpr bool is_func = was_not_an_ill_form(declval<T>()());

int     main() {
        static_assert(!is_func<A>);
}
```
work in gcc: https://godbolt.org/z/ddEYahYox
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyNUk2P2yAQ_TX4gmoRcPxx8MHZbPbQ23ZVKScLwzihJSYFnGz76zu2E-12pVaVBhiY0Zs3b-ic_llrODmqnAYiGnqM8RzQIXyHdnC6czamzh_w9gtX7vLP1dMw7AnbEtaQnC2mCN9MtrxyoaE3A9CrDO3gYiuH1ljb9s6fCC_TNCW8ouh1zlk8PPwYjYdASbGhbfu1aZvnpy9tS8QGn7aYPNmMHeF0tjIi2QdlZQj0hYjHJfRCNSh7kRPilC_udOY9RD-qSJupxoR5j_4DULkhRHg9ezrxpCa0_TgoSsT2L43d64uHGWShcds_8jFDJKw6STMsGTOvW7wKUUajWqQDPs7x1a06Yjcz9js87ObPaSzXq_PfqRnoQan_Ga3Wj3t53LvXBOpVnmcFE0WZJboWuhKVTKKJFurn-6gmXSAEgxpR6YGiGlRa666gaXS0AzoGdGVYxHuXnoze1h_YmHgcu1Q5VHFn7eV-fDp79w0USrAzIYwQ0FmXK1Ykx7rgJVRc5ivRqZ5Xqpda913PyqwTvChlYmUHNtRkjT-TD3ClMwT6ZL1NTM0Z5yvGOKsywUSal0VRFqJjglVFJdYkY4DTsenEY5Ip8fVMqRsPAYPWhBjegjgqcxgA5nKIL8d4dL7G_3MBrFGu1ixLZgL13MBvFD8L3w">