[clang] Qualify non-dependent types of a class template with its declaration (PR #67566)

Vassil Vassilev via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 29 13:11:01 PDT 2023


vgvassilev wrote:

@diseraluca, thanks for the thorough description. The point of these routines is to produce code that compiles. I am not sure if we change `Foo<int>::Bar` with `Foo<T>::Bar` it will compile.

> Due to the way the current codebase is set up, the chosen specialization is `QFuture<void>` so that, for example, `QFuture::constBegin()` would be shown to the user as returning a `QFuture<void>::const_iterator`. Nonetheless, `QFuture<void>` is the only specialization that cannot have a `const_iterator` and, as a consequence, doesn't have a `constBegin` method in the first place.

I suspect that `QFuture<void>` is an explicit specialization. The intent of the code was to pick up an implicit specialization which follows much more closely the template pattern. Would selecting the first non-explicit instantiation fix your usecase?

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


More information about the cfe-commits mailing list