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

    <tr>
        <th>Summary</th>
        <td>
            Clang requires lambda-capturing constexpr values when creating a named dependent type
        </td>
    </tr>

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

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

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

<pre>
    Code is rejected as C++17 on clang-14.0.0 and current trunk.  Godbolt: https://godbolt.org/z/YPq3sza68

```c++
template <typename T>
void f() {
    constexpr int x = 1;
    const auto test1 = []() { T y{x}; };  // error: variable 'x' cannot be implicitly captured in a lambda with no capture-default specified
    const auto test2 = []() { T{x}; };  // Accepted
    const auto test3 = []() { int y{x}; };  // Accepted
    const auto test4 = [&x]() { T y{x}; };  // Accepted, warns capture is unnecessary when `f<int>` is intantiated
}
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyVU0uT2yAM_jX4oknGxo8kBx92k7bXHvbSowxKQkvACziP_fWV42R3utPdTj0YEBLSh_Sp8_rSrr0mMBEC_SSVSANGWAv5yKNYgHegLLrdrKjm-TwHdBrUEAK5BCkM7tcc4JvXnbdJlA-wT6mPvBHyK4_dpJj7sGPphf8f35_L-ILNUuQbkT_c5iafhprCTqeJDr3FRCDKdbr05PBA8CTKL5P66I2GrZBLIVcgFrdLwJ_yLiY69wEMgzzz_Q0UonxvATgkD4liKq4mon4U9ebNITzBhZezWGz4MtwWmF4GFIIP44uPGAx2lmHKxZl_UOicT9BxUvkBRplkL3zYpyFwco0DBIuHTiOcTNqD83flTNMWB5sg9qTM1pD-ELH8APHHeB-Uoj594rL8u8sxhZ-k4Z9uq1e3sjn_R35fHcs1nDC4eM_SSNXBOVIUI4YLnPbkgLmzZZow2JEfTT4asYAuGXxFN0b4k2-Zbku9KleYJa4SteuR6dwIz4MJFG9lmk2BDWvemHVEO7DFNbgKhGlUI4wc1aCJ2aqvHcK8zYZg23d9wYUfurnyBxasPd6XWR_82IQsmhg5AG_quikW2b6tc90VTYWo6hWqSnbNUhbdCgusm6ZcrDKLHdnYThXMTCtzKfOa56Ks8mZey0o1xVLKrVYoF7WocjqgsfMx8NihWWivGLphF1lpTUzxTYkxmp0juvvnAu99aE9pH_yJsivc9or1N1H5TGo">