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

    <tr>
        <th>Summary</th>
        <td>
            [Clang] Are `{ std::is_integral_v<T> } -> std::same_as<bool>` and `{ std::is_integral_v<T> }` different constraints?
        </td>
    </tr>

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

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

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

<pre>
    [Godbolt code](https://cute.godbolt.org/z/sMvY13jGf)
Code:
```C++
#include <type_traits>
#include <iostream>

template <typename T> 
concept Basic = requires(T t) {  
    { std::is_integral_v<T> } -> std::same_as<bool>;  
};  

template <typename T>  
concept Basic2 = requires(T t) {  
    { std::is_integral_v<T> };
}; 

template <typename T>  
concept Basic3 = std::is_integral_v<T>; 

int main() {
    std::cout << Basic<int> << std::endl; // why this output 0??
    std::cout << Basic2<int> << std::endl; // should output 1
    std::cout << Basic3<int> << std::endl; // should output 1
}
```
I think `->std::same_as<bool>` is used to enforce that the result of an expression should be of type bool. And obviously, `std::is_integral_v<T> ` returns a bool value. Why will the addition of this return type restriction cause different output?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyslcGO2zYQhp9mdBmsQZOSbB108NpR0ENvAYqeFpQ0tpjSpEsOvXWfvqC08XaLIFk0AQjb1Iz-_9NwPNIxmpMjaqF6hOpQ6MSTD-2k_U27U7MVZdH78ZbDH_3Ye8s4-JGgOoDcTsyXCGoHsgPZDYlpdVqSVj6cQHZ_g-zir9ff1-rzxyPIBsQBxG6fBdRu2UAtlrUH-ZjXclUq4wabRkJQe75d6ImDNhxBffhahvGRA-nza3j-ZDpfrOa7iNNnwk-gPuASH7wb6ML4qKMZENQBA_2ZTKAIcvsJGWSDsHnEl3REnLeRx8yvdiY-Gcd0Cto-XUHtF-nNAR_yj3ta1Gd60hHUvvfeZkZ114TN4d-772B_jVv-RHBQj2-w_j-Vmqm-afhfA-MYz9o4kNsX_lf6u9DgE2cCUPvFKJ--45l_uXpPJTfa2WNuT3yebsiTiegTXxKjANXl9Q4P-W6TOPlkxy8W6_eIqx8Tzyf19p-0bH_JD-v-QKhF7sZvNGMt0ERMkUZkj-SOPgyEPGlGnggDxWQZ_RG1Q_rrEihG490Xmp5yKDcEZsEV7tyIvr8an6K9gdxngu80Xi0wEKfgIupZBa_aJlrhb9MNn421M4geR8PZOfvlg1zuWbwDRQ5mmOODTpFwNMcjBXL8UjBQXTG2amxUowtq1_VWqrLcbmQxtVUlaD02_aapSFGteyVoo5WSQlZNVVeFaaWQSpSyXJdiLTarSjRlX9fNSL3qK1FDKeisjV1Zez3n8VeYGBO1tVRyW1jdk43zkJXS0TPOQZAyz9zQ5nse-nSKUAprIsdXFTZs5-m8t9qdoDrgLlCu2M8ZRLVA7cZ36-X817oO3sU8ll2ey12Rgm3fvhJOhqfUrwZ_BtnlR3r5ergE_5kGBtnNhYggu7lQ_wQAAP__xQvxXg">