Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

deduction guides do not work through alias templates

オープン
#14,794 コメント 1 件 リアクション 0 件 担当者 1 名 GitHub で見る

@sean-mcmanus がすでに取り組んでいます。

2026年9月23日 から。

評価

この issue はまだ評価されていません。

説明

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.

主要言語
TypeScript
スター
6.2k
フォーク
1.7k
平均マージ
1日 4時間
マージ済み PR(30日)
58

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/vscode-cpptools のほかの issue

microsoft/vscode-cpptools の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。