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

    <tr>
        <th>Summary</th>
        <td>
            Templated lambda invoked in compile time doesn't instantiates if declared inside templated function
        </td>
    </tr>

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

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

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

<pre>
    ```
template<typename>
[[nodiscard]]
constexpr auto foo() noexcept
{
    constexpr auto extract_size = []<typename argument_t>() constexpr -> int
    {
        return 1;
    };
 //return extract_size.template operator()<int>(); // works
    constexpr int result = extract_size.template operator()<int>(); // undefined function 'operator()<int>'
    return result;
}

int main() {
 return foo<void>();
}
```

https://godbolt.org/z/6bj4d6zef

<source>:10:19: error: constexpr variable 'result' must be initialized by a constant expression
<source>:10:50: note: undefined function 'operator()<int>' cannot be used in a constant expression

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJykVF1v6ygQ_TX4ZdTIBrvED37Ix83-gX2_wmaccC8GC8Zpm1-_wnabtNqutLoRGojgzJxzGKNiNGeH2LBqz6pjpia6-ND8Nd3wuguEQ9Z6_daw53wd-ZHlO8JhtIqQiQO9jejUgEz8WPbmRHvntYmdCppVxzTmrc67SPg6BlATeei9Z3zLeA3O42uHI60Z5H5ZAAB8weArBdXRz2huCEwcYeH9QARUOE8DOvpJidNS4J7liYkfYBzdK3wql34BaQoOCib2j6eO9_-Mnxg_receKW3enQE_YlDkw0KAiUOq-c6Hif2aA158-B3_Ta5xBAHjZGnW-WdVJqexNw419JPryHgHjMtv0fJOaBW5MPlwILmxLOaYuA7KuNXtu6MrOt20OFy90Y_kvqb63GNLvBCNkYndouPsdestbXw4M366MX56bn-V-vmG_SOIiUP0U-jmphS7Ik-hZmIHGIIPaXH3-aqCUa3FZMiqkksYpkjQIhhnyChrbqihfQO1AJUjSGCM0Xj3fdEqBXA-fSm7_30J0Cnn_ExjiqjBuP-qn-lG6FrUKsOmkJwXRbHd8uzS5EqiLHvstrXqdSl7obY9F1XVdbXMZZ-Zhue8zCWXaS75RheykpXoaq4rpfOSlTkOytiNtdchmZ-ZGCdsijzf1jKzqkUb5xeEc4cvMO8yztODEpoEemqnc2Rlbk2keE9Dhiw2f6_drMGqodUKjLv634vgzg-jsQhkBgTtMTrGJYFZTDCKMILpQWNnVZgh0WgE-kj5bnU2Bdt86SZDl6nddH5g_JQ4rdPTGPwv7Ijx06wkMn5apV4b_k8AAAD__1E0mMg">