[clang] [Clang] Correctly construct template arguments for file-scope template template parameters (PR #76811)

Younan Zhang via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 4 04:44:28 PST 2024


zyn0217 wrote:

It is interesting to note that, if we exchange the position of two template parameters, i.e.

```cpp
template <class T>
concept C = false;

template <typename T, unsigned N> struct S {};

template <template <C, unsigned> typename T, unsigned N> // The template-template parameter now precedes the NTTP
int wow(T<int, N> ts);

int main() { return wow<S, 3>(S<int, 3>{}); }
```

then the crash disappears.

https://github.com/llvm/llvm-project/pull/76811


More information about the cfe-commits mailing list