Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

deduction guides do not work through alias templates

Aperta
#14,794 1 commento 0 reazioni 1 assegnatario Vedi su GitHub

@sean-mcmanus ci sta già lavorando.

Dal 23/9/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

bug Language Service parser
Environment
  • OS and Version: x64, Arch Linux (7.2.6.arch2-1)
  • VS Code Version: 1.138.0 commit: 7debcd0e2acdea1c52de81bf9ee1620444407dda
  • C/C++ Extension Version: 1.35.2 pre-release
  • If using SSH remote, specify OS of remote machine: N/A
Bug Summary and Steps to Reproduce

Bug Summary: Intellisense fails to perform CTAD in the following code, when an alias template for Foo is created:

template<typename T>
struct Foo{
    Foo(auto...){}
};
template<typename ...T>
Foo(T...) -> Foo<T...[0uz]>;

template<typename T>
using Foo2 = Foo<T>;

int main(){
    Foo x{3.1f};  // OK
    Foo2 y{3.1f}; // Not OK??
    return 0;
}
Image

GCC accepts this code.

Steps to reproduce:

  1. Create a new folder, open it as a workspace, and copy test.cpp into it
  2. Open file
  3. See error

Expected behavior:
Intellisense correctly performs CTAD and does not raise an error.

Configuration and Logs

c_cpp_properties.json: (None used)

Log Diagnostics output

Language server logging

Other Extensions

No response

Additional context

In testing, a variadic deduction guide and the use of pack indexing seemed necessary to trigger the bug. Although I'm not certain, it could indicate a problem with pack indexing somehow blocking template deduction.

Lingua principale
TypeScript
Stelle
6.2k
Fork
1.7k
Merge medio
1g 4h
PR unite (30g)
58

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoft/vscode-cpptools

Tutte le issue di microsoft/vscode-cpptools

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.