[clang] [Clang][Sema] Refactor collection of multi-level template argument lists (PR #106585)

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 24 13:33:24 PDT 2024


zygoloid wrote:

In @sdkrystian's example, does the use of `A<1>::B<T>` within `A<0>::B` cause an implicit instantiation to take place? I would have expected that no implicit instantiation takes place at that point because `A<1>::B<T>` is a dependent type. I would expect that the specialization of `A<1>::B` would need to be visible from the point of instantiation of `A<1>::B<int>`, which it is, so that example looks to me like it should be valid. The wording seems a bit unclear though, so maybe it's worth checking with CWG.

My understanding is that the point of [temp.expl.spec]/7 is that an explicit specialization needs to be declared before the point where we'd otherwise consider implicitly instantiating a specialization from the primary template or a partial specialization, and in this example it seems to me that it is.

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


More information about the cfe-commits mailing list