Open
Description
Example below compiles fine under MSVC and GCC
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>();
}
If foo isn't templated, it compiles fine.
https://godbolt.org/z/6bj4d6zef