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

    <tr>
        <th>Summary</th>
        <td>
            C++ static constexpr class variables considered 'invalid' as template arguments
        </td>
    </tr>

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

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

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

<pre>
    https://godbolt.org/z/WY54brjqY
```cpp
struct A {
    static constexpr int VALUE = 42;
    template <int ARG>
 constexpr int bar() const {
        return ARG;
    }

 constexpr int foo() const {
        return this->template bar<this->VALUE>();
 }
};

static_assert(A{}.foo()==42);
```
This code compiles with every version of GCC I tried, but I cannot get it to compile with clang at all.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMk09vm0wQxj_NcBnFglkw9oGDbeIo0nt61T_KqVpgsDdaWLo7OE0_fYVx7KTtoQgJ7TPLb54dHnQI5tAzF5BtISsjPcrR-aKzDaWpiirXvBZHkSGA2gDtgfYH11TOysL5A9D-J9D-61OWVv75-xPEJcQbWMbzXQ_DrATxYy24Qci3s4KIGESLqbF2fRD-MXg0veCXzX-f7xFUiSmBerdbuBusFkZQu2nj5v8HUPeX-kdGpT3QCmg96x-7TpdnGX0_I96VIC8vJ_gbtXXun6hyNOEO1P3V8GRH7d7k8wEn52fWrf-teV5e1bfxTYP6pkNgL0CrzdQ6LxdXR6BKUGVK74HXrzAvPx1NwNo1jLXrBmM54IuRI_KJ_Sue2AfjenQtPux2-IjiDTdAO6xGwUesdd87wQMLGkFxb5CZUVvdH1ALamsXUVOoZq3WOuIiyVVMSZ4uk-hYJFncLNM8idtlq9uYVUurZV4z61WaZFkemYJiSpOY1tMyTRaZTuoqyyhZN7xs2wzSmDtt7MLaUzflLzIhjFwkSRrny8jqim04B5mo5xc8V4FoyrUvppfuqvEQII2tCRJuGDFiudgBbYG2f-aytjoEPGlvdDUNbqqYhj03CJSb_qStaYBy1OEWU-0PY8e9hGj09vdfyMhxrBa164D2k4vL427w7plrAdqfvQeg_eVwp4J-BQAA__9Akxmt">