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

    <tr>
        <th>Summary</th>
        <td>
            discrepancy between clang and nvcc regarding std::is_invocable_v
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang
      </td>
    </tr>

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

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

<pre>
    https://godbolt.org/z/3cP5v4cbd

Basically, nvcc does not check availability by host/device attributes in std::is_invocable_v but clang does. This makes std::is_invocable_v returns false for a host function in a kernel for clang but not for nvcc.

Open this issue to discuss whether this should be treated as a clang bug.

@Artem-B 
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx0ksuO4ywQhZ8Gb0odOfjS9sKL9N_y9p_F7FtcKjYTAhFVuCfz9COc1tykXthIFJyvDnUUkVsC4iS6F9G9VirzGtN0_07q6l2udLT3aWW-kWhOQs5Czku0Ono-xLQIOf8Qcm7Ml25rjbaifhX16fF_UeSM8v4u5H8QNmPARiQIkcGsaC6gNuW80s47voO-wxqJhZwtbs4gKObkdGYkcAGIbeE3J0dvLmzRKO3xbQOdGYxXYdnFD_B1dQRXdUH69EpCzikQnJUnhHNMoHY0nHMw7GIoPAUXTAH9Xn8ACqo0X3aKncOfZv-_YQAucEeUETiCdWQyEbyvyCumR5XWmL0FjcAJFaMFRaB-EZa_REVbnxLj9ekFKjs1dmxGVeF07MehHtphbKt1MrUZBjv2z209DmPb4XBsTT_Wuu-65rnFyk2yls2xfMOx7dqD7Y8Kx_GsdXdEXfeirfGqnD94v13LUKvdwtSPY9dXXmn0tKdDyr1NIWUJSprK-SedFxJt7R0x_VZgxx6n8gIJbyqYO2jkd8Tw4VQF-4hEwkUl68Ly2biqnPy_-XO8Zn0w8SrkXJAfy9MtxW9oSoZ2ByTkvJv4GQAA__8VC_Vf">