[clang] [Clang][Sema] Refactor collection of multi-level template argument lists (PR #106585)
Krystian Stasiowski via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 23 10:42:02 PDT 2024
sdkrystian wrote:
Reduced further to:
```cpp
template<int N>
struct A
{
template<typename T>
static constexpr bool f();
};
template<>
template<typename T>
constexpr bool A<0>::f()
{
return A<1>::f<T>(); // note: undefined function 'f<int>' cannot be used in a constant expression
}
template<>
template<typename T>
constexpr bool A<1>::f()
{
return true;
}
static_assert(A<0>::f<int>()); // error: static assertion expression is not an integral constant expression
```
https://github.com/llvm/llvm-project/pull/106585
More information about the cfe-commits
mailing list