microsoft / microsoft/vscode-cpptools
inlay parameter hint does not work for dependent function templates
Nessuno ha ancora preso questa issue.
- Lingua principale
- TypeScript
- Stelle
- 6.2k
- Fork
- 1.7k
- Merge medio
- 14h 46m
- PR unite (30g)
- 61
Descrizione
Environment
- OS and version: Ubuntu 20.04
- VS Code: 1.70.0
- C/C++ extension: 1.20.0
- Other extensions you installed (and if the issue persists after disabling them):
- If using SSH remote, specify OS of remote machine:
- A clear and concise description of what the bug is, including information about the workspace (i.e. is the workspace a single project or multiple projects, size of the project, etc).
Bug Summary and Steps to Reproduce
Bug Summary:
I'm not quite sure this should be a bug or a feature request, since it seems to be highly related with #2973
Steps to reproduce:
template <typename T>
void func1 (T arg);
template <typename T>
void func2 () {
T val;
func1(val); // no inlay hint for `val`
func1<int>(42); // OK
}
Expected behavior
an inlay hint arg: appears before val, because there's no other overload besides the main template.
Code sample and Logs
template <typename T>
void func1 (T arg);
template <typename T>
void func2 () {
T val;
func1(val); // no inlay hint for `val`
func1<int>(42); // OK
}
```json
{
"configurations": [
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/**",
],
"defines": [
],
"compilerPath": "/usr/bin/g++-10",
"cStandard": "c11",
"cppStandard": "c++11",
"intelliSenseMode": "gcc-x64",
"browse": {
"path": [
]
}
}
],
"version": 4
}
### Screenshots
_No response_
### Additional context
_No response_
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia riproducendo l'esempio di template di funzione dipendente dell'issue con la VS Code C/C++ extension e conferma che la chiamata con template esplicito riceva un suggerimento inline, mentre la chiamata dedotta non lo riceva. Il lavoro è completato quando la chiamata dedotta visualizza un suggerimento arg: prima di val senza modificare il comportamento della chiamata con template esplicito.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- cpp
- Ambito
- devtools
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100