Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

deduction guides do not work through alias templates

Đang mở
#14,794 1 bình luận 0 reaction 1 người được giao Xem trên GitHub

@sean-mcmanus đang làm issue này rồi.

Từ ngày 23/9/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

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.

Ngôn ngữ chính
TypeScript
Star
6.2k
Fork
1.7k
Merge trung bình
1 ngày 4 giờ
Pull request đã merge (30 ngày)
58

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của microsoft/vscode-cpptools

Tất cả issue của microsoft/vscode-cpptools

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.