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

Approaches to reducing what is exported from modules

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

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
30/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Ít trao đổi
Công nghệ
cpp
Lĩnh vực
compilers

Hướng nghiên cứu

Bắt đầu bằng việc xem xét cách C++/WinRT hiện phát sinh các khai báo bên trong các khối export. So sánh cách tiếp cận của STL là đánh dấu từng khai báo với cách tiếp cận của libc++ là export các using-declarations, sau đó xác định hướng mà dự án muốn theo đuổi. Được xem là hoàn tất khi một chiến lược export đã chọn và có thể bảo trì được triển khai nhất quán, nhưng issue không xác định các tệp hoặc bài kiểm thử.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Currently, C++/WinRT uses a crude approach to exporting declarations: it exports all declarations within an export block. This is permitted by the standard because the standard does not wish to force implementers to distinguish every individual declaration for export. At present, I see two directions for improving this. One is the approach used by the STL, which marks each declaration that needs to be exported with export. The other is the approach used by libc++, which redeclare the declarations to be exported as using-declarations and export them. The advantage of the former is that it more closely resembles a library designed with modules from the very beginning, but the downside is that different overloads must be marked individually. The advantage of the latter is that different overloads can be exported with a single declaration, and it yields a cleaner Git history; the disadvantage is that the export list must be maintained manually. I believe both approaches are good options.

Ngôn ngữ chính
C++
Star
1.9k
Fork
281
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

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/cppwinrt

Tất cả issue của microsoft/cppwinrt

Issue tương tự

Thêm issue về C++

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.