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

    <tr>
        <th>Summary</th>
        <td>
            __has_unique_object_representations doesn't seem to play nicely with templates
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang:frontend,
            accepts-invalid,
            rejects-valid
      </td>
    </tr>

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

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

<pre>
    ```cpp
template<class T>
inline constexpr auto has_unique_object_representations = __has_unique_object_representations(T);

static_assert(not __has_unique_object_representations(_BitInt(7))); // passes, per clang/test/SemaCXX/has_unique_object_reps_bitint.cpp
static_assert(not has_unique_object_representations<_BitInt(7)>); // fails, yet is the same thing
```
```
$ clang --version
clang version 17.0.0 (https://github.com/llvm/llvm-project.git 39c0602414d4b0efb1e4749b0e9fdd7974026bf7)
Target: x86_64-unknown-linux-gnu
Thread model: posix
```
Compiler Explorer repro: https://godbolt.org/z/j6Pc484f5
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUVM1upDgQfhpzsbplyubvwCHpBGlvK20Oc0PGFI2zbpu1i0xnn35Fk8xoRy3NjGSBqCrX91M2OiV79ogtKx5Z8ZTpleYQW_M6DtkQxveWlWJfZlmYeGLigfCyOE3I5Mk4nRJ_YfJ5T1nvrEdugk-E1yVyvVLgs0796u0_K_ZheEVDfcQlYkJPmmzwiTP5xPv-p3UM6hcGDZOPO9z-TFvW9DoljMSg9oF-sVn_aOkPv-2ptrb7ko-cQceg48vWMjE48QUjN077M4OOMBGD7i-86NOXLwy6u0ipHyxZT8dvtt2j-XOS8vQDSfn8f5KTtu7G8R2J28RpRp70BTnN1p8_fPqc4f1PULs4fji8YUw2-D2xBz9CPK-O4ig4g3omWhKTDzuDs6V5HY4mXBh0zr19vg5LDJuk49kSl40RpQCVq1ENAqchR1WpZhDYTONYNZUSUA7TTeEN-0XHMxKTD_xal32pDqv_24ev_uCsX6-Hs18_6uaIeuSXMKLbqpeQ7PWuzFO4LNZh5M_XxYWIkW9eh23TD4LCOARHxxC3cf_LoHst_zSqVlORja0cG9noDNu8rEVTqUYU2dzmhS7GCsuxqOWEA8ixygcDpYDBFJPCzLYgQAol6ryCGoqjxFLWtZnqMkdZVIopgRdt3XHzbsPObEortiWIvMmcHtCl2yUF2E-ifJhi8IR-ZAAMTgxAG4MLpYP1b9rZ7_GI2yDS4Vu0eMpiexvSsJ4TU8LZROk7NFly2P7CJeJjwOQZVMQT4oVT4IvT79xbg-6df7U088__RcrW6NrfOzwMupsNiUF3c-K_AAAA__-rG4Kx">