deduction guides do not work through alias templates
@sean-mcmanus 已经在做这个了。
开始于 2026年9月23日。
评估
这个 Issue 还没有评估数据。
描述
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;
}
GCC accepts this code.
Steps to reproduce:
- Create a new folder, open it as a workspace, and copy test.cpp into it
- Open file
- See error
Expected behavior:
Intellisense correctly performs CTAD and does not raise an error.
Configuration and Logs
c_cpp_properties.json: (None used)
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.
- 主要语言
- TypeScript
- 星标
- 6.2k
- 派生
- 1.7k
- 平均合并
- 1 天 4 小时
- 30 天内合并 PR
- 58
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/vscode-cpptools 的其他 Issue
-
bug Language Service regression
microsoft/vscode-cpptools#14795 · 1 条评论 · 已指派 1 人 ·
-
more info needed
microsoft/vscode-cpptools#14793 · 2 条评论 · 已指派 1 人 ·
-
more info needed
难度 4/5 3-5 天 新手友好度 35/100
microsoft/vscode-cpptools#14787 · 1 条评论 · 已指派 1 人 ·
-
[Bug] cpptools fails to start on Ubuntu ARM64 due to missing execute permissions on shared libraries 未关闭bug fixed Language Service regression
microsoft/vscode-cpptools#14779 · 1 条评论 · 已指派 1 人 ·
-
Language Service more info needed
microsoft/vscode-cpptools#14778 · 1 条评论 · 已指派 1 人 ·
查看 microsoft/vscode-cpptools 的全部 Issue
相似的 Issue
-
bug(cli): hapi doctor inline-media prints a fabricated B:\ helper-script path in packaged installs 未关闭
难度 2/5 1-3 小时 新手友好度 70/100
-
Crush 未关闭
难度 1/5 1 小时以内 新手友好度 85/100
catppuccin/catppuccin#3125 ·
-
难度 1/5 1 小时以内 新手友好度 90/100
ElementsProject/cln-application#167 · 1 条评论 · 1 个 reaction ·
-
难度 2/5 1-3 小时 新手友好度 75/100
Quantco/pnpm-licenses#17 ·
-
难度 2/5 1-3 小时 新手友好度 75/100